Skip to content

-fno-ghci-sandbox & -fbreak-on-error hang on exceptions

Summary

Using -fno-ghci-sandbox & -fbreak-on-error together will hang when exceptions are thrown. NB: I have to use the former because I’m developing an SDL game and it’s required to run the game from within ghci. I wish to use the latter so’s I can investigate uncaught exceptions.

Steps to reproduce

  1. Run ghci -ignore-dot-ghci -fno-ghci-sandbox -fbreak-on-error (I believe the -ignore-dot-ghci to be optional, but it does help to isolate the bug).

  2. When ghci has loaded, run readFile "some path that does not exist"

  3. Observe that it has hung, and does not e.g. respond to ⌃C.

Expected behavior

I expected it to do what it would have done with just -fbreak-on-error:

Stopped in <exception thrown>, <unknown>
_exception :: e = _
[<unknown>] Prelude>

Environment

  • GHC version used: ghc 8.8.1

Optional:

  • Operating System: macOS 10.15.2
  • System Architecture: x86-64
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information