RE: Haskell 98 report; D Specification of Derived Instances

2002-01-29 Thread Simon Peyton-Jones
| Just before Section D.1 there is the sentence | | When inferring the context for the derived instances, type | synonyms must be expanded out first. | | I don't understand it. Which type synonyms need expansion? Consider type Foo a = [a] data T a = MkT (Foo a) deriving( Eq )

Re: Haskell 98 report; D Specification of Derived Instances

2002-01-28 Thread Olaf Chitil
> When inferring the context for the derived instances, type synonyms must > be expanded out first. > > I don't understand it. Which type synonyms need expansion? All the u_n > are type variables. I worked it out. Given data cx => T u1 ... uk = K1 t11 ... t1k1 | ...| Kn tn1 ... tnkn deriving