@@ -2326,15 +2326,15 @@ disjointSubtrees _ (Leaf hA (L kA _)) (Leaf hB (L kB _)) =
23262326 hA /= hB || kA /= kB
23272327disjointSubtrees s (Leaf hA (L kA _)) b =
23282328 lookupCont (\ _ -> True ) (\ _ _ -> False ) hA kA s b
2329- disjointSubtrees s (BitmapIndexed bA aryA) (BitmapIndexed bB aryB)
2329+ disjointSubtrees s (BitmapIndexed bmA aryA) (BitmapIndexed bmB aryB)
23302330 -- TODO: Try removing this check and just rely on disjointArrays.
2331- | bA .&. bB == 0 = True
2331+ | bmA .&. bmB == 0 = True
23322332 | aryA `A.unsafeSameArray` aryB = False
2333- | otherwise = disjointArrays s bA aryA bB aryB
2334- disjointSubtrees s (BitmapIndexed bA aryA) (Full aryB) =
2335- disjointArrays s bA aryA fullBitmap aryB
2336- disjointSubtrees s (Full aryA) (BitmapIndexed bB aryB) =
2337- disjointArrays s fullBitmap aryA bB aryB
2333+ | otherwise = disjointArrays s bmA aryA bmB aryB
2334+ disjointSubtrees s (BitmapIndexed bmA aryA) (Full aryB) =
2335+ disjointArrays s bmA aryA fullBitmap aryB
2336+ disjointSubtrees s (Full aryA) (BitmapIndexed bmB aryB) =
2337+ disjointArrays s fullBitmap aryA bmB aryB
23382338disjointSubtrees s (Full aryA) (Full aryB)
23392339 | aryA `A.unsafeSameArray` aryB = False
23402340 | otherwise = go (maxChildren - 1 )
@@ -2346,13 +2346,13 @@ disjointSubtrees s (Full aryA) (Full aryB)
23462346 (# stB # ) ->
23472347 disjointSubtrees (nextShift s) stA stB &&
23482348 go (i - 1 )
2349- disjointSubtrees s a@ (Collision hA _) (BitmapIndexed bB aryB)
2350- | m .&. bB == 0 = True
2349+ disjointSubtrees s a@ (Collision hA _) (BitmapIndexed bmB aryB)
2350+ | m .&. bmB == 0 = True
23512351 | otherwise = case A. index# aryB i of
23522352 (# stB # ) -> disjointSubtrees (nextShift s) a stB
23532353 where
23542354 m = mask hA s
2355- i = sparseIndex bB m
2355+ i = sparseIndex bmB m
23562356disjointSubtrees s a@ (Collision hA _) (Full aryB) =
23572357 case A. index# aryB i of
23582358 (# stB # ) -> disjointSubtrees (nextShift s) a stB
@@ -2367,18 +2367,18 @@ disjointSubtrees s a b@Collision{} = disjointSubtrees s b a
23672367{-# INLINABLE disjointSubtrees #-}
23682368
23692369disjointArrays :: Eq k => Shift -> Bitmap -> A. Array (HashMap k a ) -> Bitmap -> A. Array (HashMap k b ) -> Bool
2370- disjointArrays ! s ! bA ! aryA ! bB ! aryB = go (bA .&. bB )
2370+ disjointArrays ! s ! bmA ! aryA ! bmB ! aryB = go (bmA .&. bmB )
23712371 where
23722372 go 0 = True
2373- go b = case A. index# aryA iA of
2373+ go bm = case A. index# aryA iA of
23742374 (# stA # ) -> case A. index# aryB iB of
23752375 (# stB # ) ->
23762376 disjointSubtrees (nextShift s) stA stB &&
2377- go (b .&. complement m)
2377+ go (bm .&. complement m)
23782378 where
2379- m = b .&. negate b
2380- iA = sparseIndex bA m
2381- iB = sparseIndex bB m
2379+ m = bm .&. negate bm
2380+ iA = sparseIndex bmA m
2381+ iB = sparseIndex bmB m
23822382{-# INLINE disjointArrays #-}
23832383
23842384disjointCollisions :: Eq k => Hash -> A. Array (Leaf k a ) -> Hash -> A. Array (Leaf k b ) -> Bool
0 commit comments