on master help sign in
avoid lambda expressions
b5da64bWillem Van Onsem
src/Data/Sequence/Extra.hs+1−1
@@ -7,7 +7,7 @@ import Data.Sequence
7import Control.Parallel.Strategies
7import Control.Parallel.Strategies
8
8
9instance NFData a => NFData (Seq a) where
9instance NFData a => NFData (Seq a) where
10− rnf = \v -> rnf' (viewl v)
10+ rnf = rnf' . viewl
11 where
11 where
12 rnf' EmptyL = ()
12 rnf' EmptyL = ()
13 rnf' (a :< r) = rnf a >| rnf' (viewl r)
13 rnf' (a :< r) = rnf a >| rnf' (viewl r)
src/Data/Terminfo/Parse.hs+1−1
@@ -39,7 +39,7 @@ instance Show CapExpression where
39 ++ " <= " ++ show (sourceString c)
39 ++ " <= " ++ show (sourceString c)
40 where
40 where
41 hexDump :: [Word8] -> String
41 hexDump :: [Word8] -> String
42− hexDump = foldr (\b s -> showHex b s) ""
42+ hexDump = foldr showHex ""
43
43
44instance NFData CapExpression where
44instance NFData CapExpression where
45 rnf (CapExpression ops !_bytes !str !c !pOps)
45 rnf (CapExpression ops !_bytes !str !c !pOps)
src/Graphics/Vty/Output/TerminfoBased.hs+1−1
@@ -203,7 +203,7 @@ reserveTerminal termName outFd = do
203 , assumedStateRef = newAssumedStateRef
203 , assumedStateRef = newAssumedStateRef
204 -- I think fix would help assure tActual is the only
204 -- I think fix would help assure tActual is the only
205 -- reference. I was having issues tho.
205 -- reference. I was having issues tho.
206− , mkDisplayContext = \tActual -> terminfoDisplayContext tActual terminfoCaps
206+ , mkDisplayContext = (`terminfoDisplayContext` terminfoCaps)
207 }
207 }
208 sendCap s = sendCapToTerminal t (s terminfoCaps)
208 sendCap s = sendCapToTerminal t (s terminfoCaps)
209 maybeSendCap s = when (isJust $ s terminfoCaps) . sendCap (fromJust . s)
209 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)
81combinedOpsForLayers pic r
81combinedOpsForLayers pic r
82 | regionWidth r == 0 || regionHeight r == 0 = MVector.new 0
82 | regionWidth r == 0 || regionHeight r == 0 = MVector.new 0
83 | otherwise = do
83 | otherwise = do
84− layerOps <- mapM (\layer -> buildSpans layer r) (picLayers pic)
84+ layerOps <- mapM (`buildSpans` layer) (picLayers pic)
85 case layerOps of
85 case layerOps of
86 [] -> fail "empty picture"
86 [] -> fail "empty picture"
87 [ops] -> substituteSkips (picBackground pic) ops
87 [ops] -> substituteSkips (picBackground pic) ops