[m-rev.] trivial diff: fix promise_semipure
David Jeffery
dgj at missioncriticalit.com
Fri May 3 19:33:00 AEST 2002
> IMHO this bug shows why we should allow some kind of useable syntax that
> allows you to do pattern matching without deconstruction and
> reconstruction. If you only have to type a name once, you only have to
> get it right once.
That's such a good idea that (IIRC) Simon implemented it last year. ;-)
See 'Unification Expressions' in the reference manual.
Unification expressions are represented by '@'.
e.g. rather than
p(promise_semipure(A, B), promise_semipure(A, B)).
you can write:
p(X @ promise_semipure(_, _), X).
...which is what you were looking for, I think.
dgj
--------------------------------------------------------------------------
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