Merge pull request #204 from hapytex/hlint/remove-lambda
avoid lambda expressions
commitab621ee8a4a2ad621b5fdaf4acdbf041423ed6de
authorJonathan Daugherty <cygnus@foobox.com>
dateMon 15 Feb 2021, 14:48 (6 years ago)
parent7f8d21bb5da64b
src/Data/Sequence/Extra.hs+1−1
@@ -7,7 +7,7 @@ import Data.Sequence
77import Control.Parallel.Strategies
88
99instance NFData a => NFData (Seq a) where
10− rnf = \v -> rnf' (viewl v)
10+ rnf = rnf' . viewl
1111 where
1212 rnf' EmptyL = ()
1313 rnf' (a :< r) = rnf a >| rnf' (viewl r)
src/Data/Terminfo/Parse.hs+1−1
@@ -39,7 +39,7 @@ instance Show CapExpression where
3939 ++ " <= " ++ show (sourceString c)
4040 where
4141 hexDump :: [Word8] -> String
42− hexDump = foldr (\b s -> showHex b s) ""
42+ hexDump = foldr showHex ""
4343
4444instance NFData CapExpression where
4545 rnf (CapExpression ops !_bytes !str !c !pOps)
src/Graphics/Vty/Output/TerminfoBased.hs+1−1
@@ -209,7 +209,7 @@ reserveTerminal termName outFd = do
209209 , assumedStateRef = newAssumedStateRef
210210 -- I think fix would help assure tActual is the only
211211 -- reference. I was having issues tho.
212− , mkDisplayContext = \tActual -> terminfoDisplayContext tActual terminfoCaps
212+ , mkDisplayContext = (`terminfoDisplayContext` terminfoCaps)
213213 }
214214 sendCap s = sendCapToTerminal t (s terminfoCaps)
215215 maybeSendCap s = when (isJust $ s terminfoCaps) . sendCap (fromJust . s)
src/Graphics/Vty/PictureToSpans.hs+1−1
@@ -81,7 +81,7 @@ combinedOpsForLayers :: Picture -> DisplayRegion -> ST s (MRowOps s)
8181combinedOpsForLayers pic r
8282 | regionWidth r == 0 || regionHeight r == 0 = MVector.new 0
8383 | otherwise = do
84− layerOps <- mapM (\layer -> buildSpans layer r) (picLayers pic)
84+ layerOps <- mapM (`buildSpans` layer) (picLayers pic)
8585 case layerOps of
8686 [] -> fail "empty picture"
8787 [ops] -> substituteSkips (picBackground pic) ops