
17 Apr
2007
17 Apr
'07
8:16 a.m.
Henning Thielemann wrote:
instance Ord x => Ord (Index (Complex x)) where (Index (Complex a b)) `compare` (Index (Complex c d)) = (a, b) `compare` (c, d)
should be good enough. 'Index' marks the purpose for the type.
That requires extended instance declarations, doesn't it?
Aha. Yes it does. I don't see any simpler workaround than the one you proposed then, while sticking to Haskell 98. Thanks, Bertram