@@ -1435,7 +1435,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
14351435 -- branch vs. branch
14361436 go s ! sz (BitmapIndexed b1 ary1) (BitmapIndexed b2 ary2) =
14371437 let b' = b1 .|. b2
1438- A. RunRes dsz ary' =
1438+ A. RunResA dsz ary' =
14391439 unionArrayByInternal sz
14401440 (go (s+ bitsPerSubkey))
14411441 b1
@@ -1444,7 +1444,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
14441444 ary2
14451445 in A. Sized dsz (bitmapIndexedOrFull b' ary')
14461446 go s ! sz (BitmapIndexed b1 ary1) (Full ary2) =
1447- let A. RunRes dsz ary' =
1447+ let A. RunResA dsz ary' =
14481448 unionArrayByInternal sz
14491449 (go (s+ bitsPerSubkey))
14501450 b1
@@ -1453,7 +1453,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
14531453 ary2
14541454 in A. Sized dsz (Full ary')
14551455 go s ! sz (Full ary1) (BitmapIndexed b2 ary2) =
1456- let A. RunRes dsz ary' =
1456+ let A. RunResA dsz ary' =
14571457 unionArrayByInternal sz
14581458 (go (s+ bitsPerSubkey))
14591459 fullNodeMask
@@ -1462,7 +1462,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
14621462 ary2
14631463 in A. Sized dsz (Full ary')
14641464 go s ! sz (Full ary1) (Full ary2) =
1465- let A. RunRes dsz ary' =
1465+ let A. RunResA dsz ary' =
14661466 unionArrayByInternal sz
14671467 (go (s+ bitsPerSubkey))
14681468 fullNodeMask
@@ -1475,7 +1475,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
14751475 | b1 .&. m2 == 0 = let ary' = A. insert ary1 i t2
14761476 b' = b1 .|. m2
14771477 in A. Sized sz (bitmapIndexedOrFull b' ary')
1478- | otherwise = let A. RunRes dsz ary' =
1478+ | otherwise = let A. RunResA dsz ary' =
14791479 A. updateWithInternal' ary1 i $ \ st1 ->
14801480 go (s+ bitsPerSubkey) sz st1 t2
14811481 in A. Sized dsz (BitmapIndexed b1 ary')
@@ -1487,7 +1487,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
14871487 | b2 .&. m1 == 0 = let ary' = A. insert ary2 i $! t1
14881488 b' = b2 .|. m1
14891489 in A. Sized sz (bitmapIndexedOrFull b' ary')
1490- | otherwise = let A. RunRes dsz ary'=
1490+ | otherwise = let A. RunResA dsz ary'=
14911491 A. updateWithInternal' ary2 i $ \ st2 ->
14921492 go (s+ bitsPerSubkey) sz t1 st2
14931493 in A. Sized dsz (BitmapIndexed b2 ary')
@@ -1498,14 +1498,14 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
14981498 go s ! sz (Full ary1) t2 =
14991499 let h2 = leafHashCode t2
15001500 i = index h2 s
1501- A. RunRes dsz ary' =
1501+ A. RunResA dsz ary' =
15021502 update16WithInternal' ary1 i $ \ st1 ->
15031503 go (s+ bitsPerSubkey) sz st1 t2
15041504 in A. Sized dsz (Full ary')
15051505 go s ! sz t1 (Full ary2) =
15061506 let h1 = leafHashCode t1
15071507 i = index h1 s
1508- A. RunRes dsz ary' =
1508+ A. RunResA dsz ary' =
15091509 update16WithInternal' ary2 i $ \ st2 ->
15101510 go (s+ bitsPerSubkey) sz t1 st2
15111511 in A. Sized dsz (Full ary')
@@ -1583,7 +1583,7 @@ unionArrayByInternal siz f b1 b2 ary1 ary2 = A.runInternal $ do
15831583 A. write mary i =<< A. indexM ary2 i2
15841584 go sz (i+ 1 ) (i1 ) (i2+ 1 ) (m `unsafeShiftL` 1 )
15851585 d <- go siz 0 0 0 (b' .&. negate b') -- XXX: b' must be non-zero
1586- return (A. RunRes d mary)
1586+ return (A. RunResM d mary)
15871587 -- TODO: For the case where b1 .&. b2 == b1, i.e. when one is a
15881588 -- subset of the other, we could use a slightly simpler algorithm,
15891589 -- where we copy one array, and then update.
@@ -2051,7 +2051,7 @@ update16With' ary idx f
20512051update16WithInternal' :: A. Array e -> Int -> (e -> A. Sized e ) -> A. RunResA e
20522052update16WithInternal' ary idx f =
20532053 let A. Sized s x = f $! A. index ary idx
2054- in A. RunRes s (update16 ary idx x)
2054+ in A. RunResA s (update16 ary idx x)
20552055{-# INLINE update16WithInternal' #-}
20562056
20572057-- | Unsafely clone an array of 16 elements. The length of the input
0 commit comments