
20 Mar
2007
20 Mar
'07
11:53 a.m.
Ian Lynagh
(D# x) `compare` (D# y) | x <## y = LT | x ==## y = EQ | otherwise = GT
becomes
(D# x) `compare` (D# y) | x <## y = LT | x ==## y = EQ | x >## y = GT | otherwise = error "Incomparable values"
I'm pretty uncomfortable with calling 'error' in this situation. How about throwing an imprecise exception instead? Regards, Malcolm