[m-dev.] for review: use bitsets in quantification

Simon Taylor stayl at cs.mu.OZ.AU
Wed Nov 8 15:44:50 AEDT 2000


Fergus wrote:
> Since `enum' uses int, all enums will have lower and upper bounds, and
> so I think we might as well just put `enum_first' and `enum_last'
> functions in the `enum' type class.  That will simplify the type class
> hierarchy without restricting flexibility. 

...
 
> For `enumerable', it does make more sense to split out the lower
> and upper bounds, since natural numbers (`unsigned' or perhaps
> `natural', i.e. non-negative arbitrary-precision integers) might
> be quite commonly used, and have a lower bound but no upper bound.
> But off-hand I can't think of any good example algorithms which
> would use the `lb_enumerable' type class.  Hmm...
 
I'd argue that for consistency the class hierarchies for `enum' and
`enumerable' should be the same, given that `int' is just a cheap
and nasty version of `integer'.

Simon.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list