We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5633ea commit 048f20dCopy full SHA for 048f20d
Data/HashMap/Internal.hs
@@ -1859,10 +1859,13 @@ intersectionArrayBy f !b1 !b2 !ary1 !ary2
1859
testBit x = x .&. m /= 0
1860
b' = b .&. complement m
1861
(len, bFinal) <- go 0 0 0 bCombined bIntersect
1862
- l <- A.read mary 0
1863
case len of
1864
0 -> pure Empty
1865
- 1 | isLeafOrCollision l -> pure l
+ 1 -> do
+ l <- A.read mary 0
1866
+ if isLeafOrCollision l
1867
+ then pure l
1868
+ else BitmapIndexed bFinal <$> (A.unsafeFreeze =<< A.shrink mary len)
1869
_ -> bitmapIndexedOrFull bFinal <$> (A.unsafeFreeze =<< A.shrink mary len)
1870
where
1871
bCombined = b1 .|. b2
0 commit comments