ghc-lib-parser-9.8.2.20240223: The GHC API, decoupled from GHC versions

Safe Haskell | None
Language | Haskell2010

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

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

# Documentation

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

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