ghc-7.10.2: The GHC API

Safe HaskellNone
LanguageHaskell2010

ErrUtils

Synopsis

Documentation

type MsgDoc = SDoc

data Validity

Constructors

IsValid 
NotValid MsgDoc 

data ErrMsg

Instances

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

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

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

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

a wrapper around dumpSDoc. First check whether the dump flag is set Do nothing if it is unset

dumpIfSet_dyn_printer :: PrintUnqualified -> DynFlags -> DumpFlag -> SDoc -> IO ()

a wrapper around dumpSDoc. First check whether the dump flag is set Do nothing if it is unset

Unlike dumpIfSet_dyn, has a printer argument but no header argument

dumpSDoc :: DynFlags -> PrintUnqualified -> DumpFlag -> String -> SDoc -> IO ()

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

When hdr is empty, we print in a more compact format (no separators and blank lines)

The DumpFlag is used only to choose the filename to use if --dump-to-file is used; it is not used to decide whether to dump the output

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