Skip to content

Replace custom exception classes (ExceptionMonad) with classes from the exceptions library

There are quite a few classes in GHC which are similar to the MonadMask, MonadCatch and MonadThrow classes in the exceptions library. Now that's a boot library it seems to make sense to make GHC depend on it and use those classes rather than the custom ones.

  • It fits in better with the rest of the ecosystem, GHC API users would have to implement less custom instances.
  • Many instances of the classes can be derived using DerivingVia.

Modules of interest are Exception, Panic, GHC.Driver.Monad.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information