[mercury-users] existential type question
Peter Ross
pro at missioncriticalit.com
Sat Nov 30 23:27:34 AEDT 2002
stayl wrote:
> On 30-Nov-2002, Peter Ross <peter.ross at miscrit.be> wrote:
> > % mmc -e arg2.m
> > arg2.m:022: In clause for predicate `arg2:p/2':
> > arg2.m:022: in unification of variable `MaybeArg'
> > arg2.m:022: and term `arg(Arg)':
> > arg2.m:022: type error in argument(s) of functor `arg/1'.
> > arg2.m:022: Argument 1 (Arg) has type `(some [T] T)',
> > arg2.m:022: expected type was `(some [U] U)'.
> > For more information, try recompiling with `-E'.
>
> > :- type maybe_arg
> > ---> some [U] arg(U)
> > ; no.
> >
> > :- pred p(t::in, maybe_arg::out) is cc_multi.
> >
> > p(I, MaybeArg) :-
> > q(I, Univ),
> > Arg = univ_value(Univ),
> > MaybeArg = arg(Arg).
>
> Shouldn't that be
> MaybeArg = 'new arg'(Arg).
Doh!!!! That is all it is. Thanks.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.423 / Virus Database: 238 - Release Date: 28/11/2002
--------------------------------------------------------------------------
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