[mercury-users] Seemingly spurious 'some but not all arguments have modes' error.
Simon Taylor
staylr at gmail.com
Sun Feb 11 10:45:44 AEDT 2007
On 10-Feb-2007, Julian Fondren <ayrnieu at gmail.com> wrote:
> This error:
>
> partialmode.m:026: Error: some but not all arguments have modes:
> command((string :: in), out(pred((list(dummy) :: in), (io :: di), (io
> :: uo)) is det)).
> partialmode.m:027: Error: clause for predicate `partialmode.command/2'
> partialmode.m:027: without preceding `pred' declaration.
> partialmode.m:027: Inferred :- pred command(string,
> pred((list.list((partialmode.dummy))), (io.state), (io.state))).
> partialmode.m:027: Error: no mode declaration for predicate
> partialmode.m:027: `partialmode.command/2'.
> partialmode.m:027: (Use `--infer-modes' to enable mode inference.)
> partialmode.m:027: Inferred :- mode command(in, out(/* unique
> */(pred((ground
> partialmode.m:027: >> ground), (unique >> clobbered), (free >> unique))
> is
> partialmode.m:027: det))).
>
> comes from the trailing module. Using the commented pred/mode
> declarations, it compiles and operates without remark. The
> first line of the error message seems really strange, in that
> it shows nicely moded arguments.
>
> % :- pred command(string::in, out(pred(list(dummy)::in, io::di,
> io::uo) is det)) is semidet.
This should be:
:- pred command(string::in,
pred(list_dummy, io, io)::out(pred(in, di, uo) is det))
is semidet.
Simon.
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to: mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions: mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the users
mailing list