Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : fix#5464
http://hackage.haskell.org/trac/ghc/changeset/3a9fddde75b60603f36190f365791cfde752c06e >--------------------------------------------------------------- commit 3a9fddde75b60603f36190f365791cfde752c06e Author: Simon Peyton Jones <[email protected]> Date: Mon Oct 3 16:51:12 2011 +0100 Comments and refactoring (probably breaks the branch) >--------------------------------------------------------------- compiler/typecheck/TcGenDeriv.lhs | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/compiler/typecheck/TcGenDeriv.lhs b/compiler/typecheck/TcGenDeriv.lhs index 37c45aa..4846d00 100644 --- a/compiler/typecheck/TcGenDeriv.lhs +++ b/compiler/typecheck/TcGenDeriv.lhs @@ -78,15 +78,17 @@ data DerivStuff -- Please add these auxiliary top-level bindings -- All these generate ZERO-BASED tag operations -- I.e first constructor has tag 0 - -- Scrap your boilerplate - | DerivDataCon DataCon -- For constructor C we get $cC :: Constr - | DerivTyCon TyCon -- For tycon T we get $tT :: DataType -- Generics - | DerivGenMetaTyCons MetaTyCons - | DerivGenRepTyCon TyCon - | DerivInst (InstInfo RdrName) - | DerivHsBind (LHsBind RdrName) + | DerivGenMetaTyCons MetaTyCons -- New data types + | DerivGenRepTyCon TyCon -- New type family instances + + | DerivHsBind (LHsBind RdrName) -- Yes, but not for the method bindings + -- Rather for top-level auxiliary bindings + + -- Scrap your boilerplate (replaced by DerivHsBind) +-- | DerivDataCon DataCon -- For constructor C we get $cC :: Constr +-- | DerivTyCon TyCon -- For tycon T we get $tT :: DataType isDupAux :: DerivStuff -> DerivStuff -> Bool _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
