File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1893,9 +1893,6 @@ difference = go 0
18931893-- TODO: This could be faster if we would keep track of which elements of ary2
18941894-- we've already matched. Those could be skipped when we check the following
18951895-- elements of ary1.
1896- --
1897- -- TODO: For some reason, ary2 is unboxed, but ary1 is not.
1898- -- https://gitlab.haskell.org/ghc/ghc/-/issues/26525
18991896differenceCollisions :: Eq k => Hash -> A. Array (Leaf k v1 ) -> HashMap k v1 -> Hash -> A. Array (Leaf k v2 ) -> HashMap k v1
19001897differenceCollisions ! h1 ! ary1 t1 ! h2 ! ary2
19011898 | h1 == h2 =
Original file line number Diff line number Diff line change @@ -507,7 +507,10 @@ filter f = \ ary ->
507507 len <- go ary mary 0 0 n
508508 shrink mary len
509509 where
510- go ary mary iAry iMary n
510+ -- Without the @!@ on @ary@ we end up reboxing the array when using
511+ -- 'differenceCollisions'. See
512+ -- https://gitlab.haskell.org/ghc/ghc/-/issues/26525.
513+ go ! ary ! mary ! iAry ! iMary ! n
511514 | iAry >= n = return iMary
512515 | otherwise = do
513516 x <- indexM ary iAry
You can’t perform that action at this time.
0 commit comments