[m-rev.] for review: user-defined comparison

Ralph Becket rafe at cs.mu.OZ.AU
Wed Jul 10 09:01:32 AEST 2002


This reminds me of something I've considered doing for a while, namely
adding the following to builtin.m:

:- pred T < T.
:- mode in < in is semidet.

X < Y :- compare((<), X, Y).

and so on for (=<), (>), (>=) and getting rid of (<) etc. in int.m and
float.m.

This would allow us to use inequalities on all terms, not just ints and
floats.

Would this lead to any grief?

- Ralph
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list