I am trying to compile a program which uses equality between 5-tuples. I
know I probably should define my own data type and derive equality on
that, but as it is now, I use a 5-tuple.
For some reason nhc98 only defines equality for tuples up to 4.
I can work around this by defining the equality myself:
instance (Eq a,Eq b,Eq c,Eq d,Eq e) => Eq (a,b,c,d,e) where
(a,b,c,d,e) == (a',b',c',d',e') = a == a' && b == b' && c == c' && d == d' && e == e'
but then both ghc and hugs complains about a duplicate instance
declaration, and I really want to write portable code.
I don't know what the standard says about this, but this is not listed
as a deficiency in http://www.cs.york.ac.uk/fp/nhc98/98.html
Is there a way to fix this in nhc98?
n.
--
[ http://www.dtek.chalmers.se/~d95mback/ ] [ PGP: 0x453504F1 ] [ UIN: 4439498 ]
Opinions expressed above are mine, and not those of my future employees.
SIGBORE: Signature boring error, core dumped