diff --git a/src/Data/Sequence/Extra.hs b/src/Data/Sequence/Extra.hs index cab9b9c..70a9c3e 100644 --- a/src/Data/Sequence/Extra.hs +++ b/src/Data/Sequence/Extra.hs @@ -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) diff --git a/src/Data/Terminfo/Parse.hs b/src/Data/Terminfo/Parse.hs index f8a3457..a4bde6c 100644 --- a/src/Data/Terminfo/Parse.hs +++ b/src/Data/Terminfo/Parse.hs @@ -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) diff --git a/src/Graphics/Vty/Output/TerminfoBased.hs b/src/Graphics/Vty/Output/TerminfoBased.hs index 03faa2c..26a1552 100644 --- a/src/Graphics/Vty/Output/TerminfoBased.hs +++ b/src/Graphics/Vty/Output/TerminfoBased.hs @@ -209,7 +209,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) diff --git a/src/Graphics/Vty/PictureToSpans.hs b/src/Graphics/Vty/PictureToSpans.hs index 17a6f87..9994bb8 100644 --- a/src/Graphics/Vty/PictureToSpans.hs +++ b/src/Graphics/Vty/PictureToSpans.hs @@ -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