Wed Sep  5 10:07:30 PDT 2007  [EMAIL PROTECTED]
  * Refactor, improve, and document the deriving mechanism
  
  This patch does a fairly major clean-up of the code that implements 'deriving.
  
  * The big changes are in TcDeriv, which is dramatically cleaned up.
    In particular, there is a clear split into
        a) inference of instance contexts for deriving clauses
        b) generation of the derived code, given a context 
    Step (a) is skipped for standalone instance decls, which 
    have an explicitly provided context.
  
  * The handling of "taggery", which is cooperative between TcDeriv and
    TcGenDeriv, is cleaned up a lot
  
  * I have added documentation for standalone deriving (which was 
    previously wrong).
  
  * The Haskell report is vague on exactly when a deriving clause should
    succeed.  Prodded by Conal I have loosened the rules slightly, thereyb
    making drv015 work again, and documented the rules in the user manual.
  
  I believe this patch validates ok (once I've update the test suite)
  and can go into the 6.8 branch.
  

    M ./compiler/typecheck/TcDeriv.lhs -295 +245
    M ./compiler/typecheck/TcEnv.lhs -13 +3
    M ./compiler/typecheck/TcGenDeriv.lhs -102 +122
    M ./compiler/typecheck/TcInstDcls.lhs -67 +59
    M ./compiler/typecheck/TcMType.lhs -2 +69
    M ./compiler/typecheck/TcSimplify.lhs -44 +5
    M ./compiler/types/TyCon.lhs -4 +17
    M ./compiler/types/Type.lhs -2 +8
    M ./docs/users_guide/flags.xml -8 +8
    M ./docs/users_guide/glasgow_exts.xml -108 +155

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

Reply via email to