ghc-9.2.1: The GHC API
Safe HaskellSafe-Inferred




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.