@@ -1435,7 +1435,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
1435
1435
-- branch vs. branch
1436
1436
go s ! sz (BitmapIndexed b1 ary1) (BitmapIndexed b2 ary2) =
1437
1437
let b' = b1 .|. b2
1438
- A. RunRes dsz ary' =
1438
+ A. RunResA dsz ary' =
1439
1439
unionArrayByInternal sz
1440
1440
(go (s+ bitsPerSubkey))
1441
1441
b1
@@ -1444,7 +1444,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
1444
1444
ary2
1445
1445
in A. Sized dsz (bitmapIndexedOrFull b' ary')
1446
1446
go s ! sz (BitmapIndexed b1 ary1) (Full ary2) =
1447
- let A. RunRes dsz ary' =
1447
+ let A. RunResA dsz ary' =
1448
1448
unionArrayByInternal sz
1449
1449
(go (s+ bitsPerSubkey))
1450
1450
b1
@@ -1453,7 +1453,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
1453
1453
ary2
1454
1454
in A. Sized dsz (Full ary')
1455
1455
go s ! sz (Full ary1) (BitmapIndexed b2 ary2) =
1456
- let A. RunRes dsz ary' =
1456
+ let A. RunResA dsz ary' =
1457
1457
unionArrayByInternal sz
1458
1458
(go (s+ bitsPerSubkey))
1459
1459
fullNodeMask
@@ -1462,7 +1462,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
1462
1462
ary2
1463
1463
in A. Sized dsz (Full ary')
1464
1464
go s ! sz (Full ary1) (Full ary2) =
1465
- let A. RunRes dsz ary' =
1465
+ let A. RunResA dsz ary' =
1466
1466
unionArrayByInternal sz
1467
1467
(go (s+ bitsPerSubkey))
1468
1468
fullNodeMask
@@ -1475,7 +1475,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
1475
1475
| b1 .&. m2 == 0 = let ary' = A. insert ary1 i t2
1476
1476
b' = b1 .|. m2
1477
1477
in A. Sized sz (bitmapIndexedOrFull b' ary')
1478
- | otherwise = let A. RunRes dsz ary' =
1478
+ | otherwise = let A. RunResA dsz ary' =
1479
1479
A. updateWithInternal' ary1 i $ \ st1 ->
1480
1480
go (s+ bitsPerSubkey) sz st1 t2
1481
1481
in A. Sized dsz (BitmapIndexed b1 ary')
@@ -1487,7 +1487,7 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
1487
1487
| b2 .&. m1 == 0 = let ary' = A. insert ary2 i $! t1
1488
1488
b' = b2 .|. m1
1489
1489
in A. Sized sz (bitmapIndexedOrFull b' ary')
1490
- | otherwise = let A. RunRes dsz ary'=
1490
+ | otherwise = let A. RunResA dsz ary'=
1491
1491
A. updateWithInternal' ary2 i $ \ st2 ->
1492
1492
go (s+ bitsPerSubkey) sz t1 st2
1493
1493
in A. Sized dsz (BitmapIndexed b2 ary')
@@ -1498,14 +1498,14 @@ unionWithKeyInternal f hm1 (HashMap siz hm2) = go 0 siz hm1 hm2
1498
1498
go s ! sz (Full ary1) t2 =
1499
1499
let h2 = leafHashCode t2
1500
1500
i = index h2 s
1501
- A. RunRes dsz ary' =
1501
+ A. RunResA dsz ary' =
1502
1502
update16WithInternal' ary1 i $ \ st1 ->
1503
1503
go (s+ bitsPerSubkey) sz st1 t2
1504
1504
in A. Sized dsz (Full ary')
1505
1505
go s ! sz t1 (Full ary2) =
1506
1506
let h1 = leafHashCode t1
1507
1507
i = index h1 s
1508
- A. RunRes dsz ary' =
1508
+ A. RunResA dsz ary' =
1509
1509
update16WithInternal' ary2 i $ \ st2 ->
1510
1510
go (s+ bitsPerSubkey) sz t1 st2
1511
1511
in A. Sized dsz (Full ary')
@@ -1583,7 +1583,7 @@ unionArrayByInternal siz f b1 b2 ary1 ary2 = A.runInternal $ do
1583
1583
A. write mary i =<< A. indexM ary2 i2
1584
1584
go sz (i+ 1 ) (i1 ) (i2+ 1 ) (m `unsafeShiftL` 1 )
1585
1585
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)
1587
1587
-- TODO: For the case where b1 .&. b2 == b1, i.e. when one is a
1588
1588
-- subset of the other, we could use a slightly simpler algorithm,
1589
1589
-- where we copy one array, and then update.
@@ -2051,7 +2051,7 @@ update16With' ary idx f
2051
2051
update16WithInternal' :: A. Array e -> Int -> (e -> A. Sized e ) -> A. RunResA e
2052
2052
update16WithInternal' ary idx f =
2053
2053
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)
2055
2055
{-# INLINE update16WithInternal' #-}
2056
2056
2057
2057
-- | Unsafely clone an array of 16 elements. The length of the input
0 commit comments