Improve -fcheck-prim-bounds error messages.
Summary
Currently Encountered out of bounds array access.
is simply barf
ed out.
Resulting in something along the lines of:
<name>: internal error
Encountered out of bounds array access.
Which makes this seem like a ghc/runtime bug. But most likely users will see this if they use primops in unsound ways.
Perhaps a message like:
Prim op bounds check failed: Encountered out of bounds array access.
This is usually the result of incorrect use of primops in user or library code.
Might be helpful.
Optional:
- Operating System:
- System Architecture: