[mercury-users] Modes problem

Ralph Becket rbeck at microsoft.com
Sat May 19 00:26:25 AEST 2001


> From: Ondrej Bojar [mailto:oboj7042 at ss1000.ms.mff.cuni.cz]
> Sent: 18 May 2001 15:09
> 
> :- pred test(list(pair(string))::in).

You need to add ' is semidet' before the full stop.

> Here, the error is similar:
> 
> pok.m:007: In clause for `test(in)':
> pok.m:007:   in argument 1 of call to function `std_util:pair/2':
> pok.m:007:   mode error: variable `A' has instantiatedness `free',
> pok.m:007:   expected instantiatedness was `ground'.

I've found that unfortunately you often get odd, unhelpful 
error messages if you omit the determinism from a lambda or
predicate using inline modes.

- Ralph
--------------------------------------------------------------------------
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