Matthew Walton <[EMAIL PROTECTED]> writes: > (==) works on types which are members of the Eq typeclass. You can > define this instance manually, or, since your type is nice and simple, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > you can get Haskell to derive it for you.
Just a comment, since a couple of people have made similar statements. Haskell will derive Eq for arbitrarily complex types - there is no restriction to "simple" types, whatever they might be. It will always give you the "obvious" structural equality. There /are/ occasions when structural equality is not quite what you want, but that decision is entirely orthogonal to whether the type definition is simple or complex. Regards, Malcolm _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell