simonmar 2004/01/23 05:55:30 PST
Modified files:
ghc/compiler/deSugar Desugar.lhs
ghc/compiler/main DriverPipeline.hs ErrUtils.lhs
HscMain.lhs HscTypes.lhs
ghc/compiler/rename RnBinds.lhs
ghc/compiler/typecheck TcRnDriver.lhs TcRnMonad.lhs
ghc/compiler/utils StringBuffer.lhs
Log:
Some small steps in the direction of making GHC useable as a library:
- The ErrMsg type is now richer: we keep the location info and the
PrintUnqualified separate until the message is printed out, and
messages have a short summary and "extra info", where the extra
info is used for things like the context info in the typechecker
(stuff that you don't normally want to see in a more visual setting,
where the context is obvious because you're looking at the code).
- hscMain now takes an extra argument of type (Messages -> IO ()),
which says what to do with the error messages. In normal usage,
we just pass ErrUtils.printErrorsAndWarnings, but eg. a development
environment will want to do something different. The direction we
need to head in is for hscMain to *never* do any output to
stdout/stderr except via abstractions like this.
Revision Changes Path
1.71 +5 -9 fptools/ghc/compiler/deSugar/Desugar.lhs
1.163 +2 -2 fptools/ghc/compiler/main/DriverPipeline.hs
1.44 +45 -14 fptools/ghc/compiler/main/ErrUtils.lhs
1.191 +57 -23 fptools/ghc/compiler/main/HscMain.lhs
1.111 +1 -1 fptools/ghc/compiler/main/HscTypes.lhs
1.91 +2 -0 fptools/ghc/compiler/rename/RnBinds.lhs
1.62 +3 -3 fptools/ghc/compiler/typecheck/TcRnDriver.lhs
1.32 +11 -8 fptools/ghc/compiler/typecheck/TcRnMonad.lhs
1.63 +2 -1 fptools/ghc/compiler/utils/StringBuffer.lhs
|