[project @ 2004-01-23 13:55:28 by simonmar]
authorsimonmar <unknown>
Fri, 23 Jan 2004 13:55:30 +0000 (13:55 +0000)
committersimonmar <unknown>
Fri, 23 Jan 2004 13:55:30 +0000 (13:55 +0000)
commit29da2cf3011c292bc4261601aff85afb13e24d54
treec07aae2a7687665f841db4b1a4ee1360aba4b045
parent433d69e5f54d14ab15e5bcb1abe1ea94517e8d9a
[project @ 2004-01-23 13:55:28 by simonmar]
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.
ghc/compiler/deSugar/Desugar.lhs
ghc/compiler/main/DriverPipeline.hs
ghc/compiler/main/ErrUtils.lhs
ghc/compiler/main/HscMain.lhs
ghc/compiler/main/HscTypes.lhs
ghc/compiler/rename/RnBinds.lhs
ghc/compiler/typecheck/TcRnDriver.lhs
ghc/compiler/typecheck/TcRnMonad.lhs
ghc/compiler/utils/StringBuffer.lhs