3 Dec 17:37
Re: Proposal: Bounded instance for IntSet (ticket #1953)
<kahl <at> cas.mcmaster.ca>
2007-12-03 16:37:49 GMT
2007-12-03 16:37:49 GMT
Yitzchak Gale wrote: > > Unfortunately, there is still no way to control export > of instances. I have some modules that do nothing but export instances --- I even make the empty export list explicit... > > 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? Whereever this Ord instance is in scope, a Bounded instance has to conform with that. It even makes sense to define the Bounded instance for the explicit purpose of preventing people to roll their own semantically inconsistent Bounded instances, especially since the correct instance is obviously somewhat non-obviousOne could of course consider to put both instances into a separate module Data.IntMap.Ord, so you can choose not to import that and roll your own instead. Wolfram
One could of course consider to put both instances
into a separate module Data.IntMap.Ord,
so you can choose not to import that
and roll your own instead.
Wolfram
RSS Feed