From eff775ced7916d671801c0aef98255c8f2e78795 Mon Sep 17 00:00:00 2001 From: Eric Lindblad Date: Wed, 23 Mar 2022 11:49:10 -0500 Subject: [PATCH] typos --- demos/Demo.hs | 2 +- src/Graphics/Vty/Attributes/Color.hs | 2 +- src/Graphics/Vty/Image.hs | 2 +- src/Graphics/Vty/Image/Internal.hs | 4 ++-- src/Graphics/Vty/Input.hs | 4 ++-- src/Graphics/Vty/Input/Mouse.hs | 4 ++-- src/Graphics/Vty/Output.hs | 2 +- src/Graphics/Vty/Output/TerminfoBased.hs | 4 ++-- src/Graphics/Vty/PictureToSpans.hs | 2 +- test/VerifyImageOps.hs | 2 +- test/VerifyOutput.hs | 2 +- test/interactive_terminal_test.hs | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/demos/Demo.hs b/demos/Demo.hs index 866752f..d472c5e 100644 --- a/demos/Demo.hs +++ b/demos/Demo.hs @@ -31,7 +31,7 @@ introText = vertCat $ map (string defAttr) [ "this line is hidden by the top layer" , "The vty demo program will echo the events generated by the pressed keys." , "Below there is a 240 color box." - , "Followed by a description of the 16 color pallete." + , "Followed by a description of the 16 color palette." , "Followed by tones of red using a 24-bit palette." , "If the 240 color box is not visible then the terminal" , "claims 240 colors are not supported." diff --git a/src/Graphics/Vty/Attributes/Color.hs b/src/Graphics/Vty/Attributes/Color.hs index f9e1bc1..41f82d3 100644 --- a/src/Graphics/Vty/Attributes/Color.hs +++ b/src/Graphics/Vty/Attributes/Color.hs @@ -95,7 +95,7 @@ import Graphics.Vty.Attributes.Color240 -- reported then the color reproduction will be incorrect. -- -- If the terminal reports <= 16 colors then the 240 color palette --- points are only mapped to the 8 color pallete. I'm not sure of +-- points are only mapped to the 8 color palette. I'm not sure of -- the RGB points for the "bright" colors which is why they are not -- addressable via the 240 color palette. -- diff --git a/src/Graphics/Vty/Image.hs b/src/Graphics/Vty/Image.hs index 093b65d..44a0998 100644 --- a/src/Graphics/Vty/Image.hs +++ b/src/Graphics/Vty/Image.hs @@ -137,7 +137,7 @@ char a c = let displayWidth = safeWcwidth c in HorizText a (TL.singleton c) displayWidth 1 --- | Make an image from a string of characters layed out on a single +-- | Make an image from a string of characters laid out on a single -- row with the same display attribute. The string is assumed to be a -- sequence of ISO-10646 characters. The input string should be -- sanitized of escape sequences (ASCII 27) and carriage returns; diff --git a/src/Graphics/Vty/Image/Internal.hs b/src/Graphics/Vty/Image/Internal.hs index 32a9c06..f80b91d 100644 --- a/src/Graphics/Vty/Image/Internal.hs +++ b/src/Graphics/Vty/Image/Internal.hs @@ -228,7 +228,7 @@ instance Monoid Image where -- -- The result image will have a width equal to the sum of the two images -- width. And the height will equal the largest height of the two --- images. The area not defined in one image due to a height missmatch +-- images. The area not defined in one image due to a height mismatch -- will be filled with the background pattern. horizJoin :: Image -> Image -> Image horizJoin EmptyImage i = i @@ -259,7 +259,7 @@ horizJoin _ _ = error "horizJoin applied to undefined values." -- -- The result image will have a height equal to the sum of the heights -- of both images. The width will equal the largest width of the two --- images. The area not defined in one image due to a width missmatch +-- images. The area not defined in one image due to a width mismatch -- will be filled with the background pattern. vertJoin :: Image -> Image -> Image vertJoin EmptyImage i = i diff --git a/src/Graphics/Vty/Input.hs b/src/Graphics/Vty/Input.hs index 36c5415..cb24267 100644 --- a/src/Graphics/Vty/Input.hs +++ b/src/Graphics/Vty/Input.hs @@ -77,7 +77,7 @@ -- The input encoding determines how UTF-8 encoded characters are -- recognized. -- --- * 7-bit mode: UTF-8 can be input unambiguiously. UTF-8 input is +-- * 7-bit mode: UTF-8 can be input unambiguously. UTF-8 input is -- a superset of ASCII. UTF-8 does not overlap escaped control key -- sequences. However, the escape key must be differentiated from -- escaped control key sequences by the timing of the input bytes. @@ -95,7 +95,7 @@ -- -- == Terminal Input is Broken -- --- Clearly terminal input has fundemental issues. There is no easy way +-- Clearly terminal input has fundamental issues. There is no easy way -- to reliably resolve these issues. -- -- One resolution would be to ditch standard terminal interfaces diff --git a/src/Graphics/Vty/Input/Mouse.hs b/src/Graphics/Vty/Input/Mouse.hs index 0080cba..f4c80f1 100644 --- a/src/Graphics/Vty/Input/Mouse.hs +++ b/src/Graphics/Vty/Input/Mouse.hs @@ -89,7 +89,7 @@ scrollDown = 65 hasBitSet :: Int -> Int -> Bool hasBitSet val bit = val .&. bit > 0 --- | Attempt to lassify an input string as a mouse event. +-- | Attempt to classify an input string as a mouse event. classifyMouseEvent :: ByteString -> KClass classifyMouseEvent s = runParser s $ do when (not $ isMouseEvent s) failParse @@ -102,7 +102,7 @@ classifyMouseEvent s = runParser s $ do 'M' -> classifyNormalMouseEvent _ -> failParse --- Given a modifer/button value, determine which button was indicated +-- Given a modifier/button value, determine which button was indicated getSGRButton :: Int -> Parser Button getSGRButton mods = let buttonMap = [ (leftButton, BLeft) diff --git a/src/Graphics/Vty/Output.hs b/src/Graphics/Vty/Output.hs index 458c3ab..130ea41 100644 --- a/src/Graphics/Vty/Output.hs +++ b/src/Graphics/Vty/Output.hs @@ -78,7 +78,7 @@ outputForConfig config = (<> config) <$> standardIOConfig >>= outputForConfig -- | Sets the cursor position to the given output column and row. -- --- This is not necessarially the same as the character position with the +-- This is not necessarily the same as the character position with the -- same coordinates. Characters can be a variable number of columns in -- width. -- diff --git a/src/Graphics/Vty/Output/TerminfoBased.hs b/src/Graphics/Vty/Output/TerminfoBased.hs index e9fa1ea..8c9336a 100644 --- a/src/Graphics/Vty/Output/TerminfoBased.hs +++ b/src/Graphics/Vty/Output/TerminfoBased.hs @@ -453,8 +453,8 @@ hardcodeColor side (r, g, b) = -- | The color table used by a terminal is a 16 color set followed by a -- 240 color set that might not be supported by the terminal. -- --- This takes a Color which clearly identifies which pallete to use and --- computes the index into the full 256 color pallete. +-- This takes a Color which clearly identifies which palette to use and +-- computes the index into the full 256 color palette. ansiColorIndex :: Color -> Int ansiColorIndex (ISOColor v) = fromEnum v ansiColorIndex (Color240 v) = 16 + fromEnum v diff --git a/src/Graphics/Vty/PictureToSpans.hs b/src/Graphics/Vty/PictureToSpans.hs index 91e7a83..b34cedc 100644 --- a/src/Graphics/Vty/PictureToSpans.hs +++ b/src/Graphics/Vty/PictureToSpans.hs @@ -72,7 +72,7 @@ displayOpsForPic pic r = Vector.create (combinedOpsForLayers pic r) -- | Returns the DisplayOps for an image rendered to a window the size -- of the image. -- --- largerly used only for debugging. +-- largely used only for debugging. displayOpsForImage :: Image -> DisplayOps displayOpsForImage i = displayOpsForPic (picForImage i) (imageWidth i, imageHeight i) diff --git a/test/VerifyImageOps.hs b/test/VerifyImageOps.hs index b271f01..6f61c40 100644 --- a/test/VerifyImageOps.hs +++ b/test/VerifyImageOps.hs @@ -137,7 +137,7 @@ cropBottomLimitsHeight :: Image -> Int -> Property cropBottomLimitsHeight i v = v >= 0 ==> v >= imageHeight (cropBottom v i) --- rediculous tests just to satisfy my desire for nice code coverage :-P +-- ridiculous tests just to satisfy my desire for nice code coverage :-P canShowImage :: Image -> Bool canShowImage i = length (show i) > 0 diff --git a/test/VerifyOutput.hs b/test/VerifyOutput.hs index 5f032f7..2af1f85 100644 --- a/test/VerifyOutput.hs +++ b/test/VerifyOutput.hs @@ -1,4 +1,4 @@ --- We setup the environment to envoke certain terminals of interest. +-- We setup the environment to invoke certain terminals of interest. -- This assumes appropriate definitions exist in the current environment -- for the terminals of interest. {-# LANGUAGE ScopedTypeVariables #-} diff --git a/test/interactive_terminal_test.hs b/test/interactive_terminal_test.hs index a12dd99..6b62f76 100644 --- a/test/interactive_terminal_test.hs +++ b/test/interactive_terminal_test.hs @@ -364,7 +364,7 @@ Did the test output match the description? |] defaultSuccessConfirmResults --- Explicitely definethe bytes that encode each example text. +-- Explicitly define the bytes that encode each example text. -- This avoids any issues with how the compiler represents string literals. -- -- This document is UTF-8 encoded so the UTF-8 string is still included for