[m-dev.] 0.13 release: op/3 syntax

Peter Schachte schachte at csse.unimelb.edu.au
Sat Mar 4 18:48:48 AEDT 2006

On Sat, Mar 04, 2006 at 05:39:02PM +1100, Mark Brown wrote:
> You can observe the error already by using an existing prefix operator
> but not enclosing it in brackets.  For example
> 	:- pred prog_type.vars((type)::in, list(tvar)::out) is det.
> needs the parentheses, otherwise it is an operator precedence error.
> Whether or not this is the bug you were referring to, I'm not sure.

I think so.  Of course, Prolog doesn't have type and :: as operators,
but here's an example of something similar in SWI Prolog:

?- X = f(- : *, +).

X = f(- : *, +) 

Look, Ma, no extra parenthesis!

Peter Schachte              Do not meddle in the affairs of wizards, for
schachte at cs.mu.OZ.AU        they are subtle and quick to anger.
www.cs.mu.oz.au/~schachte/      -- J. R. R. Tolkien 
Phone: +61 3 8344 1338      
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