Merge pull request #202 from hapytex/hlint/eta-reduction

eta reductions
This commit is contained in:
Jonathan Daugherty 2021-02-16 09:45:47 -08:00 committed by GitHub
commit f0f729d755
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -64,7 +64,7 @@ writeCapExpr cap params =
in snd $ runWriter (runStateT (writeCapOps (capOps cap)) s0)
writeCapOps :: CapOps -> Eval ()
writeCapOps ops = mapM_ writeCapOp ops
writeCapOps = mapM_ writeCapOp
writeCapOp :: CapOp -> Eval ()
writeCapOp (Bytes !offset !count) = do

View File

@ -146,7 +146,7 @@ data Image =
-- | pretty print just the structure of an image.
ppImageStructure :: Image -> String
ppImageStructure inImg = go 0 inImg
ppImageStructure = go 0
where
go indent img = tab indent ++ pp indent img
tab indent = concat $ replicate indent " "

View File

@ -136,8 +136,8 @@ mergeUnder upper lower = do
return upper
mergeRowUnder :: SpanOps -> SpanOps -> SpanOps
mergeRowUnder upperRowOps lowerRowOps =
onUpperOp Vector.empty (Vector.head upperRowOps) (Vector.tail upperRowOps) lowerRowOps
mergeRowUnder upperRowOps =
onUpperOp Vector.empty (Vector.head upperRowOps) (Vector.tail upperRowOps)
where
-- H: it will never be the case that we are out of upper ops
-- before lower ops.

View File

@ -52,7 +52,7 @@ dropOps :: Int -> SpanOps -> SpanOps
dropOps w = snd . splitOpsAt w
splitOpsAt :: Int -> SpanOps -> (SpanOps, SpanOps)
splitOpsAt inW inOps = splitOpsAt' inW inOps
splitOpsAt = splitOpsAt'
where
splitOpsAt' 0 ops = (Vector.empty, ops)
splitOpsAt' remainingColumns ops = case Vector.head ops of
@ -103,7 +103,7 @@ displayOpsColumns ops
-- | The number of rows the DisplayOps are defined for.
displayOpsRows :: DisplayOps -> Int
displayOpsRows ops = Vector.length ops
displayOpsRows = Vector.length
affectedRegion :: DisplayOps -> DisplayRegion
affectedRegion ops = (displayOpsColumns ops, displayOpsRows ops)