Sun Sep 14 16:20:44 PDT 2008  Thomas Schilling <[EMAIL PROTECTED]>
  * Use 'GhcMonad' in GHC and split up checkModule into phases.
  
  I'm not sure I covered all the ways of throwing errors in the code.
  Some functions throw ProgramErrors, some error messages.  It's still
  quite a mess, but we're getting closer.  The missing cases are mostly
  errors that cannot be fixed by the API client either or are a result
  of wrong usage, so are in any case fatal.
  
  One function, 'getModuleInfo', still returns a 'Maybe', but the
  documentation suggests it should always succeed.  So I may change that
  soon.
  
  The spit-up of of 'checkModule' has pros and cons.  The various forms
  of 'checkModule*' now become:
  
   checkAndLoadModule ms False ~~>
      loadModule =<< typecheckModule =<< parseModule (ms_mod_name ms)
  
   checkAndLoadModule ms True ~~>
     loadModule =<< desugarModule =<< typecheckModule =<< parseModule 
(ms_mod_name ms)
  
   checkModule mn False ~~>
     typecheckModule =<< parseModule mn
  
   checkModule mn True ~~>
     desugarModule =<< typecheckModule =<< parseModule mn
  
  The old APIs cannot easily be provided, since the result type would be
  different depending on the second argument.  However, a more
  convenient API can be modelled on top of these four functions
  ({parse,typecheck,desugar,load}Module).

    M ./compiler/main/GHC.hs -420 +601

View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20080914232044-7c5c6-a6b9b6a4d8e77868775562485a538011c85cfc0c.gz

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

Reply via email to