avoid lambda expressions

This commit is contained in:
Willem Van Onsem 2021-02-15 17:39:53 +01:00
parent 90ea18379d
commit b5da64bb63
4 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ import Data.Sequence
import Control.Parallel.Strategies
instance NFData a => NFData (Seq a) where
rnf = \v -> rnf' (viewl v)
rnf = rnf' . viewl
where
rnf' EmptyL = ()
rnf' (a :< r) = rnf a >| rnf' (viewl r)

View File

@ -39,7 +39,7 @@ instance Show CapExpression where
++ " <= " ++ show (sourceString c)
where
hexDump :: [Word8] -> String
hexDump = foldr (\b s -> showHex b s) ""
hexDump = foldr showHex ""
instance NFData CapExpression where
rnf (CapExpression ops !_bytes !str !c !pOps)

View File

@ -203,7 +203,7 @@ reserveTerminal termName outFd = do
, assumedStateRef = newAssumedStateRef
-- I think fix would help assure tActual is the only
-- reference. I was having issues tho.
, mkDisplayContext = \tActual -> terminfoDisplayContext tActual terminfoCaps
, mkDisplayContext = (`terminfoDisplayContext` terminfoCaps)
}
sendCap s = sendCapToTerminal t (s terminfoCaps)
maybeSendCap s = when (isJust $ s terminfoCaps) . sendCap (fromJust . s)

View File

@ -81,7 +81,7 @@ combinedOpsForLayers :: Picture -> DisplayRegion -> ST s (MRowOps s)
combinedOpsForLayers pic r
| regionWidth r == 0 || regionHeight r == 0 = MVector.new 0
| otherwise = do
layerOps <- mapM (\layer -> buildSpans layer r) (picLayers pic)
layerOps <- mapM (`buildSpans` layer) (picLayers pic)
case layerOps of
[] -> fail "empty picture"
[ops] -> substituteSkips (picBackground pic) ops