@@ -1550,7 +1550,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
1550
1550
-- branch vs. branch
1551
1551
go s ! sz (BitmapIndexed b1 ary1) (BitmapIndexed b2 ary2) =
1552
1552
let b' = b1 .|. b2
1553
- A. RunRes dsz ary' =
1553
+ A. RunResA dsz ary' =
1554
1554
unionArrayByInternal sz
1555
1555
(go (s+ bitsPerSubkey))
1556
1556
b1
@@ -1559,7 +1559,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
1559
1559
ary2
1560
1560
in A. Sized dsz (bitmapIndexedOrFull b' ary')
1561
1561
go s ! sz (BitmapIndexed b1 ary1) (Full ary2) =
1562
- let A. RunRes dsz ary' =
1562
+ let A. RunResA dsz ary' =
1563
1563
unionArrayByInternal sz
1564
1564
(go (s+ bitsPerSubkey))
1565
1565
b1
@@ -1568,7 +1568,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
1568
1568
ary2
1569
1569
in A. Sized dsz (Full ary')
1570
1570
go s ! sz (Full ary1) (BitmapIndexed b2 ary2) =
1571
- let A. RunRes dsz ary' =
1571
+ let A. RunResA dsz ary' =
1572
1572
unionArrayByInternal sz
1573
1573
(go (s+ bitsPerSubkey))
1574
1574
fullNodeMask
@@ -1577,7 +1577,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
1577
1577
ary2
1578
1578
in A. Sized dsz (Full ary')
1579
1579
go s ! sz (Full ary1) (Full ary2) =
1580
- let A. RunRes dsz ary' =
1580
+ let A. RunResA dsz ary' =
1581
1581
unionArrayByInternal sz
1582
1582
(go (s+ bitsPerSubkey))
1583
1583
fullNodeMask
@@ -1590,7 +1590,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
1590
1590
| b1 .&. m2 == 0 = let ary' = A. insert ary1 i t2
1591
1591
b' = b1 .|. m2
1592
1592
in A. Sized sz (bitmapIndexedOrFull b' ary')
1593
- | otherwise = let A. RunRes dsz ary' =
1593
+ | otherwise = let A. RunResA dsz ary' =
1594
1594
A. updateWithInternal' ary1 i $ \ st1 ->
1595
1595
go (s+ bitsPerSubkey) sz st1 t2
1596
1596
in A. Sized dsz (BitmapIndexed b1 ary')
@@ -1602,7 +1602,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
1602
1602
| b2 .&. m1 == 0 = let ary' = A. insert ary2 i $! t1
1603
1603
b' = b2 .|. m1
1604
1604
in A. Sized sz (bitmapIndexedOrFull b' ary')
1605
- | otherwise = let A. RunRes dsz ary'=
1605
+ | otherwise = let A. RunResA dsz ary'=
1606
1606
A. updateWithInternal' ary2 i $ \ st2 ->
1607
1607
go (s+ bitsPerSubkey) sz t1 st2
1608
1608
in A. Sized dsz (BitmapIndexed b2 ary')
@@ -1613,14 +1613,14 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
1613
1613
go s ! sz (Full ary1) t2 =
1614
1614
let h2 = leafHashCode t2
1615
1615
i = index h2 s
1616
- A. RunRes dsz ary' =
1616
+ A. RunResA dsz ary' =
1617
1617
update16WithInternal' ary1 i $ \ st1 ->
1618
1618
go (s+ bitsPerSubkey) sz st1 t2
1619
1619
in A. Sized dsz (Full ary')
1620
1620
go s ! sz t1 (Full ary2) =
1621
1621
let h1 = leafHashCode t1
1622
1622
i = index h1 s
1623
- A. RunRes dsz ary' =
1623
+ A. RunResA dsz ary' =
1624
1624
update16WithInternal' ary2 i $ \ st2 ->
1625
1625
go (s+ bitsPerSubkey) sz t1 st2
1626
1626
in A. Sized dsz (Full ary')
@@ -1698,7 +1698,7 @@ unionArrayByInternal siz f b1 b2 ary1 ary2 = A.runInternal $ do
1698
1698
A. write mary i =<< A. indexM ary2 i2
1699
1699
go sz (i+ 1 ) (i1 ) (i2+ 1 ) (m `unsafeShiftL` 1 )
1700
1700
d <- go siz 0 0 0 (b' .&. negate b') -- XXX: b' must be non-zero
1701
- return (A. RunRes d mary)
1701
+ return (A. RunResM d mary)
1702
1702
-- TODO: For the case where b1 .&. b2 == b1, i.e. when one is a
1703
1703
-- subset of the other, we could use a slightly simpler algorithm,
1704
1704
-- where we copy one array, and then update.
@@ -2253,7 +2253,7 @@ update16With' ary idx f
2253
2253
update16WithInternal' :: A. Array e -> Int -> (e -> A. Sized e ) -> A. RunResA e
2254
2254
update16WithInternal' ary idx f =
2255
2255
let A. Sized s x = f $! A. index ary idx
2256
- in A. RunRes s (update16 ary idx x)
2256
+ in A. RunResA s (update16 ary idx x)
2257
2257
{-# INLINE update16WithInternal' #-}
2258
2258
2259
2259
-- | Unsafely clone an array of 16 elements. The length of the input
0 commit comments