Fri Nov 28 02:36:28 PST 2008  Thomas Schilling <[EMAIL PROTECTED]>
  * Use a per-session data structure for callbacks.  Make 'WarnErrLogger'
  part of it.
  
  Part of the GHC API essentially represents a compilation framework.
  The difference of a *framework* as opposed to a *library* is that the
  overall structure of the functionality is pre-defined but certain
  details can be customised via callbacks.  (Also known as the Hollywood
  Principle: "Don't call us, we'll call you.")
  
  This patch introduces a per-session data structure that contains all
  the callbacks instead of adding lots of small function arguments
  whenever we want to give the user more control over certain parts of
  the API.  This should also help with future changes: Adding a new
  callback doesn't break old code since code that doesn't know about the
  new callback will use the (hopefully sane) default implementation.
  
  Overall, however, we should try and keep the number of callbacks small
  and well-defined (and provide useful defaults) and use simple library
  routines for the rest.

    M ./compiler/main/GHC.hs -15 +23
    M ./compiler/main/HscMain.lhs -2 +3
    M ./compiler/main/HscTypes.lhs -1 +48
    M ./ghc/Main.hs -2 +3

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

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

Reply via email to