Wed Oct 27 05:11:32 PDT 2010  Simon Marlow <[email protected]>
  * Refactoring and tidyup of HscMain and related things (also fix #1666)
  While trying to fix #1666 (-Werror aborts too early) I decided to some
  tidyup in GHC/DriverPipeline/HscMain.
  
   - The GhcMonad overloading is gone from DriverPipeline and HscMain
     now.  GhcMonad is now defined in a module of its own, and only
     used in the top-level GHC layer.  DriverPipeline and HscMain
     use the plain IO monad and take HscEnv as an argument.
  
   - WarnLogMonad is gone.  printExceptionAndWarnings is now called
     printException (the old name is deprecated).  Session no longer
     contains warnings.
  
   - HscMain has its own little monad that collects warnings, and also
     plumbs HscEnv around.  The idea here is that warnings are collected
     while we're in HscMain, but on exit from HscMain (any function) we
     check for warnings and either print them (via log_action, so IDEs
     can still override the printing), or turn them into an error if
     -Werror is on.
  
   - GhcApiCallbacks is gone, along with GHC.loadWithLogger.  Thomas
     Schilling told me he wasn't using these, and I don't see a good
     reason to have them.
  
   - there's a new pure API to the parser (suggestion from Neil Mitchell):
        parser :: String
               -> DynFlags
               -> FilePath
               -> Either ErrorMessages (WarningMessages, 
                                        Located (HsModule RdrName))

    M ./compiler/basicTypes/SrcLoc.lhs -2 +2
    M ./compiler/ghc.cabal.in +1
    M ./compiler/ghci/Debugger.hs -4 +1
    M ./compiler/main/DriverMkDepend.hs +1
    M ./compiler/main/DriverPipeline.hs -116 +105
    M ./compiler/main/ErrUtils.lhs -40 +12
    M ./compiler/main/GHC.hs -215 +172
    A ./compiler/main/GhcMonad.hs
    M ./compiler/main/HeaderInfo.hs -7 +6
    M ./compiler/main/HscMain.lhs -305 +517
    M ./compiler/main/HscTypes.lhs -298 +28
    M ./compiler/main/InteractiveEval.hs -25 +16
    M ./compiler/rename/RnNames.lhs -1 +13
    M ./compiler/simplCore/CoreMonad.lhs +1
    M ./compiler/typecheck/TcRnMonad.lhs -3 +2
    M ./compiler/typecheck/TcSplice.lhs -1 +1
    M ./compiler/utils/MonadUtils.hs -12 +12
    M ./compiler/utils/StringBuffer.lhs -2 +3
    M ./compiler/vectorise/Vectorise.hs +2
    M ./compiler/vectorise/Vectorise/Monad.hs +1
    M ./ghc/GhciMonad.hs -13 +3
    M ./ghc/InteractiveUI.hs -12 +11
    M ./ghc/Main.hs -16 +12

View patch online:
http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=ghc;a=darcs_commitdiff;h=20101027121132-12142-a96f7598509a1990a2885acaec3959dacfab3302.gz

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to