23 Jan
2002
23 Jan
'02
6:34 p.m.
Hello, say I have a type T defined the follwing way: newtype T a b = T (a b) Now I want to make every T a b with a b beeing an instance of Eq also an instance of Eq where (==) just test for equality of the encapsulated values. I try this instance Eq (a b) => Eq (T a b) where (T x) == (T x') = x == x' but it seems that this is not Haskell 98 conformant. How do I implement this in Haskell 98? Wolfgang