ghc-9.2.0.20210821: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Driver.Errors

Synopsis

Documentation

warningsToMessages :: DynFlags -> WarningMessages -> (WarningMessages, ErrorMessages) Source #

Converts a list of WarningMessages into a tuple where the second element contains only error, i.e. warnings that are considered fatal by GHC based on the input DynFlags.

printOrThrowWarnings :: Logger -> DynFlags -> Bag WarnMsg -> IO () Source #

Given a bag of warnings, turn them into an exception if -Werror is enabled, or print them out otherwise.

isWarnMsgFatal :: DynFlags -> WarnMsg -> Maybe (Maybe WarningFlag) Source #

Checks if given WarnMsg is a fatal warning.