
3 Dec
2007
3 Dec
'07
12:04 p.m.
David Benbennick wrote:
I propose to add a Bounded instance to IntSet.hs.
I am opposed to this proposal, unless someone comes up with some important use cases. Unfortunately, there is still no way to control export of instances. So libraries should avoid defining instances unless there is a compelling reason to do so. We need to be reasonably certain that the usefulness of the instance will overwhelm any unforeseen namespace pollution problems that it may cause. In this case, the Ord instance is not really natural; it is defined for technical reasons for use by the library itself (and its friends). The library has no need for a Bounded instance, so why should we prevent people from defining one for some other purpose? -Yitz