HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

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.

  • 1 type
  • 10 values
datadata PlainGhcException
#

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
valueassertPanic :: String -> Int -> a
#

Throw a failed assertion exception for a given filename and line number.