on master help sign in
avoid lambda expressions
commitb5da64bb630459aa066704ad580a750f5761b2ba authorWillem Van Onsem <vanonsem.willem@gmail.com> dateMon 15 Feb 2021, 17:39 (6 years ago) parent90ea183
4 files changed+4−4
src/Data/Sequence/Extra.hs+1−1 src/Data/Terminfo/Parse.hs+1−1 src/Graphics/Vty/Output/TerminfoBased.hs+1−1 src/Graphics/Vty/PictureToSpans.hs+1−1
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
@@ -203,7 +203,7 @@ reserveTerminal termName outFd = do
203203 , assumedStateRef = newAssumedStateRef
204204 -- I think fix would help assure tActual is the only
205205 -- reference. I was having issues tho.
206− , mkDisplayContext = \tActual -> terminfoDisplayContext tActual terminfoCaps
206+ , mkDisplayContext = (`terminfoDisplayContext` terminfoCaps)
207207 }
208208 sendCap s = sendCapToTerminal t (s terminfoCaps)
209209 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