
30 Apr
2004
30 Apr
'04
9:20 a.m.
This raises a general question: What instances should be defined in the standard libraries for types like this? A general policy would be a good thing. IMHO, at least Read, Show, Typeable and Eq could be expected, having Ord, Enum and Bounded, too, would be nice.
Good point. I've been meaning to create a separate document so we have somewhere to collect general library policies like this. It's on my whiteboard...
And I agree that Sven's suggestion would be a good policy. i.e. Eq, Show, Read, Typeable should always defined as instances, and Ord, Enum, Bounded should be defined as instances if they make sense for this type. Regards, Malcolm