[mercury-users] partial instantiation?

Ralph Becket rafe at csse.unimelb.edu.au
Mon Apr 19 11:08:19 AEST 2010

Paul Bone, Wednesday, 14 April 2010:
> I also suspect that you think that Mercury supports logic variables, it does
> not.  Cosider:
>     X = Y,
>     Y = 3
> In prolog this will bind X to 3.  In Mercury this is not valid.

Well, the compiler will reorder this particular code so that it works.

What you can't do is something like this:

:- pred aliases(T::out, T::out) is det.

aliases(X, Y) :-
	X = Y.

Unification (=) requires that at least one of the arguments be

-- Ralph
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au

More information about the users mailing list