• simonmar's avatar
    [project @ 2004-01-23 13:55:28 by simonmar] · 29da2cf3
    simonmar authored
    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.
DriverPipeline.hs 38.2 KB