HORIZON HASKELLDocslts/ghc-9.14.xb9228482026-10-12Search packagesCtrl K
Theme: |

GHC 9.14.1 · lts/ghc-9.14.x · b922848 · 2026-10-12

Moduleghc-9.14.1GHC2021

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

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