ghc-lib-parser-9.6.2.20230523: The GHC API, decoupled from GHC versions
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Types.Error.Codes

Description

Defines diagnostic codes for the diagnostics emitted by GHC.

A diagnostic code is a numeric unique identifier for a diagnostic. See Note [Diagnostic codes].

Synopsis

Documentation

constructorCode :: (Generic diag, GDiagnosticCode (Rep diag)) => diag -> Maybe DiagnosticCode Source #

This function obtain a diagnostic code by looking up the constructor name using generics, and using the GhcDiagnosticCode type family.