X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcDeriv.lhs;h=b8a5f1df34428bf4084a3e6a1c8d4c0e94e74143;hb=c2527e8dea810f1584609ad20408a38691131d28;hp=938d55cac3db6afd5bff5bc7e51f36181d89ccd9;hpb=95941de4798cc8542d6e3ea317ae3ed84470b83b;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcDeriv.lhs b/ghc/compiler/typecheck/TcDeriv.lhs index 938d55c..b8a5f1d 100644 --- a/ghc/compiler/typecheck/TcDeriv.lhs +++ b/ghc/compiler/typecheck/TcDeriv.lhs @@ -529,9 +529,10 @@ mkDataTypeEqn tycon clas -- data T a b = ... deriving( Typeable ) -- gives -- instance Typeable2 T where ... + -- Notice that: -- 1. There are no constraints in the instance -- 2. There are no type variables either - -- 2. The actual class we want to generate isn't necessarily + -- 3. The actual class we want to generate isn't necessarily -- Typeable; it depends on the arity of the type do { real_clas <- tcLookupClass (typeableClassNames !! tyConArity tycon) ; dfun_name <- new_dfun_name real_clas tycon