ghc-9.6.0.20230128: The GHC API
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.