Commit 1b3d13b6 authored by Sylvain Henry's avatar Sylvain Henry Committed by Marge Bot

Fix ghc-bignum exceptions

We must ensure that exceptions are not simplified. Previously we used:

   case raiseDivZero of
      _ -> 0## -- dummyValue

But it was wrong because the evaluation of `raiseDivZero` was removed and
the dummy value was directly returned. See new Note [ghc-bignum exceptions].

I've also removed the exception triggering primops which were fragile.
We don't need them to be primops, we can have them exported by ghc-prim.

I've also added a test for #18359 which triggered this patch.
parent a403eb91
Pipeline #21557 failed with stages
in 487 minutes and 45 seconds