
2 Dec
2007
2 Dec
'07
7:37 p.m.
On Sun, Dec 02, 2007 at 03:45:40PM -0800, David Benbennick wrote:
I propose to add a Bounded instance to IntSet.hs.
IntSet is in Ord, and there are only finitely many instances of IntSet. Therefore there is a min IntSet and a max IntSet. It turns out these bounds are very simple:
instance Bounded IntSet where minBound = empty maxBound = singleton maxBound
This seems fairly unintuitive me. the natural choices of minimum and maximum bounds for a set would seem to be singleton minBound vs singleton maxBound or empty vs universal (fromList [minBound .. maxBound]) set the odd combination of the two proposed just feels off to me. John -- John Meacham - ⑆repetae.net⑆john⑈