Pred defns

Peter Phelan peter.phelan at anite-systems.lu
Wed Mar 25 23:24:56 AEDT 1998


Hello again

I'm confused by pred definitions in Mercury.

The following is snipped from calculator.m in samples.

:- pred fullexpr(expr::out, list(char)::in, list(char)::out)
is semidet.
fullexpr(X) -->
 expr(X),
 ['\n'].

How come the declarative definition takes just one argument,
whilst there are 3 in the type declaration?

It's something to do with input/output, but this is also
difficult to understand.

Rgds

Peter




More information about the users mailing list