HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleghc-9.10.3GHC2021

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
  • Packageghc-9.10.3
  • Exports11
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourcePlain.hs
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.