[m-dev.] Tuples and pairs

Ralph Becket rafe at cs.mu.OZ.AU
Fri Dec 21 17:06:57 AEDT 2001


Okay, I just tried redefining pair/2 as {}/2 and adding a reversible
function X - Y = {X, Y} to std_util.m for backwards compatibility.

Result: not so good.  Switch detection does not work on code like the
following:

f([]) = ...
f([cons1 - X | _]) = ...
f([cons2 - X | _]) = ...
f([cons3 - X | _]) = ...

The problem arises because switch detection only looks as far as the
first call in each disjunct, rather than the first semidet goal.

This is fixable, but non-trivial and hence will have to wait until after
Xmas.

Cheers,

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