-
Simon Peyton Jones authored
--------------------- Dealing with deriving --------------------- I spent a ridiculously long time peering at a bug report whereby a 'deriving' clause sent GHC 5.02.1 into a loop. It was all to do with allowing instances like instance Foo a b => Baz (T a) (Notice the 'b' on the left which does not appear on the right.) I realised that it's hard for the deriving machinery to find a fixpoint when these sort of instance decls are around. So I now constrain *derived* instance decls not to have this form; all the tyvars on the left must appear on the right. On the way I commoned up the previously-separate tcSimplify machinery for 'deriving' and 'default' decls with that for everything else. As a result, quite a few files are touched. I hope I havn't broken anything.
ae969b47