on master help sign in
remove useless parenthesis and ellipse
commit0e5c1646f652d35d492ad79d32103d13037dfc34 authorWillem Van Onsem <vanonsem.willem@gmail.com> dateMon 15 Feb 2021, 23:07 (6 years ago) parent90ea183
7 files changed+20−20
src/Data/Terminfo/Parse.hs+3−3 src/Graphics/Vty/Image.hs+4−4 src/Graphics/Vty/Image/Internal.hs+8−8 src/Graphics/Vty/Input/Loop.hs+2−2 src/Graphics/Vty/Input/Terminfo.hs+1−1 src/Graphics/Vty/PictureToSpans.hs+1−1 src/Graphics/Vty/Span.hs+1−1
src/Data/Terminfo/Parse.hs+3−3
@@ -336,9 +336,9 @@ data BuildResults = BuildResults
336336instance Semigroup BuildResults where
337337 v0 <> v1
338338 = BuildResults
339− { outParamCount = (outParamCount v0) `max` (outParamCount v1)
340− , outCapOps = (outCapOps v0) <> (outCapOps v1)
341− , outParamOps = (outParamOps v0) <> (outParamOps v1)
339+ { outParamCount = outParamCount v0 `max` outParamCount v1
340+ , outCapOps = outCapOps v0 <> outCapOps v1
341+ , outParamOps = outParamOps v0 <> outParamOps v1
342342 }
343343
344344instance Monoid BuildResults where
src/Graphics/Vty/Image.hs+4−4
@@ -297,7 +297,7 @@ cropBottom h inI
297297 | otherwise = go inI
298298 where
299299 go EmptyImage = EmptyImage
300− go i@(CropBottom {croppedImage, outputWidth, outputHeight})
300+ go i@CropBottom {croppedImage, outputWidth, outputHeight}
301301 | outputHeight <= h = i
302302 | otherwise = CropBottom croppedImage outputWidth h
303303 go i
@@ -314,7 +314,7 @@ cropRight w inI
314314 | otherwise = go inI
315315 where
316316 go EmptyImage = EmptyImage
317− go i@(CropRight {croppedImage, outputWidth, outputHeight})
317+ go i@CropRight {croppedImage, outputWidth, outputHeight}
318318 | outputWidth <= w = i
319319 | otherwise = CropRight croppedImage w outputHeight
320320 go i
@@ -331,7 +331,7 @@ cropLeft w inI
331331 | otherwise = go inI
332332 where
333333 go EmptyImage = EmptyImage
334− go i@(CropLeft {croppedImage, leftSkip, outputWidth, outputHeight})
334+ go i@CropLeft {croppedImage, leftSkip, outputWidth, outputHeight}
335335 | outputWidth <= w = i
336336 | otherwise =
337337 let leftSkip' = leftSkip + outputWidth - w
@@ -350,7 +350,7 @@ cropTop h inI
350350 | otherwise = go inI
351351 where
352352 go EmptyImage = EmptyImage
353− go i@(CropTop {croppedImage, topSkip, outputWidth, outputHeight})
353+ go i@CropTop {croppedImage, topSkip, outputWidth, outputHeight}
354354 | outputHeight <= h = i
355355 | otherwise =
356356 let topSkip' = topSkip + outputHeight - h
src/Graphics/Vty/Image/Internal.hs+8−8
@@ -150,25 +150,25 @@ ppImageStructure inImg = go 0 inImg
150150 where
151151 go indent img = tab indent ++ pp indent img
152152 tab indent = concat $ replicate indent " "
153− pp _ (HorizText {outputWidth}) = "HorizText(" ++ show outputWidth ++ ")"
154− pp _ (BGFill {outputWidth, outputHeight})
153+ pp _ HorizText {outputWidth} = "HorizText(" ++ show outputWidth ++ ")"
154+ pp _ BGFill {outputWidth, outputHeight}
155155 = "BGFill(" ++ show outputWidth ++ "," ++ show outputHeight ++ ")"
156− pp i (HorizJoin {partLeft = l, partRight = r, outputWidth = c})
156+ pp i HorizJoin {partLeft = l, partRight = r, outputWidth = c}
157157 = "HorizJoin(" ++ show c ++ ")\n" ++ go (i+1) l ++ "\n" ++ go (i+1) r
158− pp i (VertJoin {partTop = t, partBottom = b, outputWidth = c, outputHeight = r})
158+ pp i VertJoin {partTop = t, partBottom = b, outputWidth = c, outputHeight = r}
159159 = "VertJoin(" ++ show c ++ ", " ++ show r ++ ")\n"
160160 ++ go (i+1) t ++ "\n"
161161 ++ go (i+1) b
162− pp i (CropRight {croppedImage, outputWidth, outputHeight})
162+ pp i CropRight {croppedImage, outputWidth, outputHeight}
163163 = "CropRight(" ++ show outputWidth ++ "," ++ show outputHeight ++ ")\n"
164164 ++ go (i+1) croppedImage
165− pp i (CropLeft {croppedImage, leftSkip, outputWidth, outputHeight})
165+ pp i CropLeft {croppedImage, leftSkip, outputWidth, outputHeight}
166166 = "CropLeft(" ++ show leftSkip ++ "->" ++ show outputWidth ++ "," ++ show outputHeight ++ ")\n"
167167 ++ go (i+1) croppedImage
168− pp i (CropBottom {croppedImage, outputWidth, outputHeight})
168+ pp i CropBottom {croppedImage, outputWidth, outputHeight}
169169 = "CropBottom(" ++ show outputWidth ++ "," ++ show outputHeight ++ ")\n"
170170 ++ go (i+1) croppedImage
171− pp i (CropTop {croppedImage, topSkip, outputWidth, outputHeight})
171+ pp i CropTop {croppedImage, topSkip, outputWidth, outputHeight}
172172 = "CropTop("++ show outputWidth ++ "," ++ show topSkip ++ "->" ++ show outputHeight ++ ")\n"
173173 ++ go (i+1) croppedImage
174174 pp _ EmptyImage = "EmptyImage"
src/Graphics/Vty/Input/Loop.hs+2−2
@@ -143,7 +143,7 @@ readFromDevice = do
143143 return stringRep
144144
145145applyConfig :: Fd -> Config -> IO ()
146−applyConfig fd (Config{ vmin = Just theVmin, vtime = Just theVtime })
146+applyConfig fd Config{ vmin = Just theVmin, vtime = Just theVtime }
147147 = setTermTiming fd theVmin (theVtime `div` 100)
148148applyConfig _ _ = fail "(vty) applyConfig was not provided a complete configuration"
149149
@@ -224,7 +224,7 @@ logInitialInputState input classifyTable = case _inputDebug input of
224224 Just h -> do
225225 Config{ vmin = Just theVmin
226226 , vtime = Just theVtime
227− , termName = Just theTerm, .. } <- readIORef $ _configRef input
227+ , termName = Just theTerm } <- readIORef $ _configRef input
228228 _ <- hPrintf h "initial (vmin,vtime): %s\n" (show (theVmin, theVtime))
229229 forM_ classifyTable $ \i -> case i of
230230 (inBytes, EvKey k mods) -> hPrintf h "map %s %s %s %s\n" (show theTerm)
src/Graphics/Vty/Input/Terminfo.hs+1−1
@@ -74,7 +74,7 @@ visibleChars = [ ([x], EvKey (KChar x) [])
7474ctrlChars :: ClassifyMap
7575ctrlChars =
7676 [ ([toEnum x],EvKey (KChar y) [MCtrl])
77− | (x,y) <- zip ([0..31]) ('@':['a'..'z']++['['..'_'])
77+ | (x,y) <- zip [0..31] ('@':['a'..'z']++['['..'_'])
7878 , y /= 'i' -- Resolve issue #3 where CTRL-i hides TAB.
7979 , y /= 'h' -- CTRL-h should not hide BS
8080 ]
src/Graphics/Vty/PictureToSpans.hs+1−1
@@ -109,7 +109,7 @@ substituteSkips ClearBackground ops = do
109109 let rowOps'' = swapSkipsForSingleColumnCharSpan ' ' currentAttr rowOps'
110110 MVector.write ops row rowOps''
111111 return ops
112−substituteSkips (Background {backgroundChar, backgroundAttr}) ops = do
112+substituteSkips Background {backgroundChar, backgroundAttr} ops = do
113113 -- At this point we decide if the background character is single
114114 -- column or not. obviously, single column is easier.
115115 case safeWcwidth backgroundChar of
src/Graphics/Vty/Span.hs+1−1
@@ -56,7 +56,7 @@ splitOpsAt inW inOps = splitOpsAt' inW inOps
5656 where
5757 splitOpsAt' 0 ops = (Vector.empty, ops)
5858 splitOpsAt' remainingColumns ops = case Vector.head ops of
59− t@(TextSpan {}) -> if remainingColumns >= textSpanOutputWidth t
59+ t@TextSpan {} -> if remainingColumns >= textSpanOutputWidth t
6060 then let (pre,post) = splitOpsAt' (remainingColumns - textSpanOutputWidth t)
6161 (Vector.tail ops)
6262 in (Vector.cons t pre, post)