The umbrella type that encompasses all the different messages that GHC might output during the different compilation stages. See Note [GhcMessage].
Constructors
GhcPsMessage :: PsMessage -> GhcMessageA message from the parsing phase.
GhcTcRnMessage :: TcRnMessage -> GhcMessageA message from typecheck/renaming phase.
GhcDsMessage :: DsMessage -> GhcMessageA message from the desugaring (HsToCore) phase.
GhcDriverMessage :: DriverMessage -> GhcMessageA message from the driver.
GhcUnknownMessage :: UnknownDiagnostic (DiagnosticOpts GhcMessage) -> GhcMessageAn "escape" hatch which can be used when we don't know the source of the message or if the message is not one of the typed ones. The Diagnostic and Typeable constraints ensure that if we know, at pattern-matching time, the originating type, we can attempt a cast and access the fully-structured error. This would be the case for a GHC plugin that offers a domain-specific error type but that doesn't want to place the burden on IDEs/application code to "know" it. The Diagnostic constraint ensures that worst case scenario we can still render this into something which can be eventually converted into a DecoratedSDoc.
Instances4Generic, Diagnostic, Rep, DiagnosticOpts
Generic GhcMessageDefined in ghc-9.10.3 · GHC.Driver.Errors.TypesDiagnostic GhcMessageDefined in ghc-9.10.3 · GHC.Driver.Errors.Ppr · orphantype Rep GhcMessage = D1 ('MetaDataDefined in ghc-9.10.3 · GHC.Driver.Errors.Types"GhcMessage"
"GHC.Driver.Errors.Types"
"ghc-9.10.3-cff4"
'False) ((C1 ('MetaCons"GhcPsMessage"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PsMessage)) :+: C1 ('MetaCons"GhcTcRnMessage"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TcRnMessage))) :+: (C1 ('MetaCons"GhcDsMessage"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DsMessage)) :+: (C1 ('MetaCons"GhcDriverMessage"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DriverMessage)) :+: C1 ('MetaCons"GhcUnknownMessage"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (UnknownDiagnostic (DiagnosticOpts GhcMessage)))))))type DiagnosticOpts GhcMessage = GhcMessageOptsDefined in ghc-9.10.3 · GHC.Driver.Errors.Ppr · orphan