Skip to content
Snippets Groups Projects
Commit 1b3d13b6 authored by Sylvain Henry's avatar Sylvain Henry Committed by Marge Bot
Browse files

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
No related branches found
No related tags found
No related merge requests found
Showing
with 255 additions and 126 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment