HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Moduleghc-10.0.0.20260917GHC2024

GHC.Utils.Panic.Plain

Defines a simple exception type and utilities to throw it. The PlainGhcException type is a subset of the GhcException type. It omits the exception constructors that involve pretty-printing via SDoc.

The reason for this is to avoid import cycles / use of boot files. GHC.Utils.Outputable has many transitive dependencies. To throw exceptions from these modules, the functions here can be used without introducing import cycles.

Synopsis

This type is very similar to GhcException, but it omits the constructors that involve pretty-printing via SDoc. Due to the implementation of fromException for GhcException, this type can be caught as a GhcException.

Note that this should only be used for throwing exceptions, not for catching, as GhcException will not be converted to this type when catching.

Constructors

Instances2Show, Exception