[mercury-users] DCG in higher-order terms

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Oct 7 00:44:02 AEST 1999


On 06-Oct-1999, Robert Bossy <bossy at ccr.jussieu.fr> wrote:
> I can't figure out how to write a lambda expression that uses DCG
> notation.
...
> Here is what I tried:
> 
> write_list(L,"\n",(pred(S::in) is det --> (print("here is: "),
>	print(S)))).

You need to specify the modes for the DCG arguments:

	write_list(L,"\n",(pred(S::in, di, uo) is det --> (print("here is: "),
		print(S)))).	   % ^^^^^^^^

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list