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

Safe Haskell | Ignore
Language | GHC2021

GHC.Driver.Errors

Synopsis

- printOrThrowDiagnostics :: Logger -> GhcMessageOpts -> DiagOpts -> Messages GhcMessage -> IO ()
- printMessages :: Diagnostic a => Logger -> DiagnosticOpts a -> DiagOpts -> Messages a -> IO ()
- mkDriverPsHeaderMessage :: MsgEnvelope PsMessage -> MsgEnvelope DriverMessage

# Documentation

printOrThrowDiagnostics :: Logger -> GhcMessageOpts -> DiagOpts -> Messages GhcMessage -> IO () #

Given a bag of diagnostics, turn them into an exception if any has `SevError`, or print them out otherwise.

printMessages :: Diagnostic a => Logger -> DiagnosticOpts a -> DiagOpts -> Messages a -> IO () #

mkDriverPsHeaderMessage :: MsgEnvelope PsMessage -> MsgEnvelope DriverMessage #

Convert a `PsError` into a wrapped `DriverMessage`; use it for dealing with parse errors when the driver is doing dependency analysis. Defined here to avoid module loops between GHC.Driver.Error.Types and GHC.Driver.Error.Ppr