Skip to content

Commit

Permalink
Fix operators warning (kowainik#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
vrom911 authored Nov 2, 2022
1 parent 9018201 commit 5787946
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Data/TypeRepMap/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -676,20 +676,20 @@ invariantCheck TypeRepMap{..} = getAll (check 0)
sz = sizeofPrimArray fingerprintAs
check i | i >= sz = All True
| otherwise =
let left = i*2+1
right = i*2+2
let left = i * 2 + 1
right = i * 2 + 2
-- maximum value in the left branch
leftMax =
fmap (\j -> (indexPrimArray fingerprintAs j, indexPrimArray fingerprintBs j))
$ lastMay
$ takeWhile (<sz)
$ iterate (\j -> j*2+2) left
$ takeWhile (< sz)
$ iterate (\j -> j * 2 + 2) left
-- minimum value in the right branch
rightMin =
fmap (\j -> (indexPrimArray fingerprintAs j, indexPrimArray fingerprintBs j))
$ lastMay
$ takeWhile (<sz)
$ iterate (\j -> j*2+1) right
$ takeWhile (< sz)
$ iterate (\j -> j * 2 + 1) right
in mconcat
[ All $
if left < sz
Expand All @@ -708,5 +708,5 @@ invariantCheck TypeRepMap{..} = getAll (check 0)
GT -> False
else True
, All $ fromMaybe True $ (<=) <$> leftMax <*> rightMin
, check (i+1)
, check (i + 1)
]

0 comments on commit 5787946

Please sign in to comment.