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

Ralph Becket rbeck at microsoft.com
Wed Nov 8 01:31:54 AEDT 2000


>From Fergus Henderson on 07/11/2000 13:53:19
> [many things I agree with]

I think I've been guilty of unnecessary abstraction (I've been
hanging around too many Haskell programmers of late :)

What we seem to be angling towards is something like Okasaki's
typeclass with reversible hashing, with the further constraint
that the hashes must form a contiguous set.

So we include (at least) to_int/1, from_int/1, first/0, last/0.
I think pred/1 and succ/1 should also go in there as methods
rather than utility functions since they may be more economically
implemented than
	pred(X) = from_int(to_int(X) - 1)
	succ(X) = from_int(to_int(X) + 1)
(again, maybe I'm being more abstract than is useful).

Ralph

--
Ralph Becket      |      MSR Cambridge      |      rbeck at microsoft.com 

--------------------------------------------------------------------------
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