Skip to content

Commit 962ecc8

Browse files
committed
Make basicOverlaps more precise
1 parent 77d8418 commit 962ecc8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Data/Bit/Internal.hs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,10 @@ instance MV.MVector U.MVector Bit where
251251
pure $ BitMVec 0 n arr
252252

253253
{-# INLINE basicOverlaps #-}
254-
basicOverlaps (BitMVec i' m' arr1) (BitMVec j' n' arr2) =
254+
basicOverlaps (BitMVec i m arr1) (BitMVec j n arr2) =
255255
sameMutableByteArray arr1 arr2
256256
&& (between i j (j + n) || between j i (i + m))
257257
where
258-
i = divWordSize i'
259-
m = nWords (i' + m') - i
260-
j = divWordSize j'
261-
n = nWords (j' + n') - j
262258
between x y z = x >= y && x < z
263259

264260
{-# INLINE basicLength #-}

0 commit comments

Comments
 (0)