ErrUtils

ghc-7.0.4: The GHC API

ErrUtils

Synopsis

- type Message = SDoc
- mkLocMessage :: SrcSpan -> Message -> Message
- printError :: SrcSpan -> Message -> IO ()
- pprMessageBag :: Bag Message -> SDoc
- data Severity
  - = SevOutput
  - | SevInfo
  - | SevWarning
  - | SevError
  - | SevFatal
- data ErrMsg
- type WarnMsg = ErrMsg
- type ErrorMessages = Bag ErrMsg
- type WarningMessages = Bag WarnMsg
- errMsgSpans :: ErrMsg -> [SrcSpan]
- errMsgContext :: ErrMsg -> PrintUnqualified
- errMsgShortDoc :: ErrMsg -> Message
- errMsgExtraInfo :: ErrMsg -> Message
- type Messages = (Bag WarnMsg, Bag ErrMsg)
- errorsFound :: DynFlags -> Messages -> Bool
- emptyMessages :: Messages
- mkErrMsg :: SrcSpan -> PrintUnqualified -> Message -> ErrMsg
- mkPlainErrMsg :: SrcSpan -> Message -> ErrMsg
- mkLongErrMsg :: SrcSpan -> PrintUnqualified -> Message -> Message -> ErrMsg
- mkWarnMsg :: SrcSpan -> PrintUnqualified -> Message -> WarnMsg
- mkPlainWarnMsg :: SrcSpan -> Message -> ErrMsg
- printErrorsAndWarnings :: DynFlags -> Messages -> IO ()
- printBagOfErrors :: DynFlags -> Bag ErrMsg -> IO ()
- printBagOfWarnings :: DynFlags -> Bag ErrMsg -> IO ()
- warnIsErrorMsg :: ErrMsg
- mkLongWarnMsg :: SrcSpan -> PrintUnqualified -> Message -> Message -> ErrMsg
- ghcExit :: DynFlags -> Int -> IO ()
- doIfSet :: Bool -> IO () -> IO ()
- doIfSet_dyn :: DynFlags -> DynFlag -> IO () -> IO ()
- dumpIfSet :: Bool -> String -> SDoc -> IO ()
- dumpIfSet_dyn :: DynFlags -> DynFlag -> String -> SDoc -> IO ()
- dumpIfSet_dyn_or :: DynFlags -> [DynFlag] -> String -> SDoc -> IO ()
- mkDumpDoc :: String -> SDoc -> SDoc
- dumpSDoc :: DynFlags -> DynFlag -> String -> SDoc -> IO ()
- putMsg :: DynFlags -> Message -> IO ()
- putMsgWith :: DynFlags -> PrintUnqualified -> Message -> IO ()
- errorMsg :: DynFlags -> Message -> IO ()
- fatalErrorMsg :: DynFlags -> Message -> IO ()
- compilationProgressMsg :: DynFlags -> String -> IO ()
- showPass :: DynFlags -> String -> IO ()
- debugTraceMsg :: DynFlags -> Int -> Message -> IO ()

# Documentation

type Message = SDoc

mkLocMessage :: SrcSpan -> Message -> Message

printError :: SrcSpan -> Message -> IO ()

pprMessageBag :: Bag Message -> SDoc

data Severity

Constructors

SevOutput |
SevInfo |
SevWarning |
SevError |
SevFatal |

data ErrMsg

Instances

Show ErrMsg |

type WarnMsg = ErrMsg

type ErrorMessages = Bag ErrMsg

type WarningMessages = Bag WarnMsg

errMsgSpans :: ErrMsg -> [SrcSpan]

errMsgContext :: ErrMsg -> PrintUnqualified

errMsgShortDoc :: ErrMsg -> Message

errMsgExtraInfo :: ErrMsg -> Message

type Messages = (Bag WarnMsg, Bag ErrMsg)

errorsFound :: DynFlags -> Messages -> Bool

emptyMessages :: Messages

mkErrMsg :: SrcSpan -> PrintUnqualified -> Message -> ErrMsg

mkPlainErrMsg :: SrcSpan -> Message -> ErrMsg

mkLongErrMsg :: SrcSpan -> PrintUnqualified -> Message -> Message -> ErrMsg

mkWarnMsg :: SrcSpan -> PrintUnqualified -> Message -> WarnMsg

mkPlainWarnMsg :: SrcSpan -> Message -> ErrMsg

printErrorsAndWarnings :: DynFlags -> Messages -> IO ()

printBagOfErrors :: DynFlags -> Bag ErrMsg -> IO ()

printBagOfWarnings :: DynFlags -> Bag ErrMsg -> IO ()

warnIsErrorMsg :: ErrMsg

mkLongWarnMsg :: SrcSpan -> PrintUnqualified -> Message -> Message -> ErrMsg

ghcExit :: DynFlags -> Int -> IO ()

doIfSet :: Bool -> IO () -> IO ()

doIfSet_dyn :: DynFlags -> DynFlag -> IO () -> IO ()

dumpIfSet :: Bool -> String -> SDoc -> IO ()

dumpIfSet_dyn :: DynFlags -> DynFlag -> String -> SDoc -> IO ()

dumpIfSet_dyn_or :: DynFlags -> [DynFlag] -> String -> SDoc -> IO ()

mkDumpDoc :: String -> SDoc -> SDoc

dumpSDoc :: DynFlags -> DynFlag -> String -> SDoc -> IO ()

Write out a dump. If --dump-to-file is set then this goes to a file. otherwise emit to stdout.

putMsg :: DynFlags -> Message -> IO ()

putMsgWith :: DynFlags -> PrintUnqualified -> Message -> IO ()

errorMsg :: DynFlags -> Message -> IO ()

fatalErrorMsg :: DynFlags -> Message -> IO ()

compilationProgressMsg :: DynFlags -> String -> IO ()

showPass :: DynFlags -> String -> IO ()

debugTraceMsg :: DynFlags -> Int -> Message -> IO ()