[mercury-users] Mercury Types Problem

Bob McKay bob_mckay at mac.com
Thu Jun 20 11:42:43 AEST 2002

Hi folks; probably a fairly trivial syntax problem this time:

On Tuesday, May 28, 2002, at 02:01 PM, Ralph Becket wrote:
> Tip: it's a good idea to name complex higher order types and modes:
> :- type eval_pred(T) == (pred(T, T, message, message, supply, supply)).
> :- inst eval_pred    == (pred(in, uo(individuals), out, out, mdi, muo) 
> is det).

I'm trying this as:

:- type eval_pred(Ind) == (pred(Ind, Ind, message, message, supply, 
:- mode eval_pred == (pred(in, out, out, out, mdi, muo) is det).

:- pred eval_ind(eval_pred(ind)).	%1
:- mode eval_ind(eval_pred).		%2

eval_ind(Uneval_ind, Eval_ind, Defmessage, Fitmessage, RS0, RS1) :-
	<clause body>

gives the error messages

eval.m:017: Error: no determinism declaration for exported
eval.m:017:   predicate `eval:eval_ind/1'.
eval.m:026: Error: clause for predicate `eval:eval_ind/6'
eval.m:026:   without preceding `pred' declaration.
eval.m:016: Error: no clauses for predicate `eval:eval_ind/1'.
eval.m:026: Inferred :- pred eval_ind((rep:ind), (rep:ind), 
(myutils:message), (
myutils:message), (random:supply), (random:supply)).

I'm assuming that the problem is the application of the type and
mode declarations at %1 and %2; unfortunately, I can't find any
description of how this should look in the reference manual, so I'd
greatly appreciate a summary of the syntax

	Many Thanks
	Bob McKay

ignature: I am using this email account for efficiency reasons while 
travelling. It is not my primary account. Please send replies for 
preference to rim at cs.adfa.edu.au (mac mail does not appear to have a 
mechanism to set the reply-to field)

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