mirror of
https://github.com/ilyakooo0/vty.git
synced 2024-11-25 19:22:08 +03:00
avoid lambda expressions
This commit is contained in:
parent
90ea18379d
commit
b5da64bb63
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user