[mercury-users] Re: State variable problem
Nicholas Nethercote
njn at csse.unimelb.edu.au
Wed May 31 11:19:28 AEST 2006
On Wed, 31 May 2006, Ralph Becket wrote:
>> Oh, I see: you're not allowed to use !Errs in a function application.
>
> Yes, state vars in function applications == very odd.
Why is that? The manual says
(http://www.cs.mu.oz.au/research/mercury/information/doc-latest/mercury_ref/State-variables.html#State%20variables):
!X may not appear as an argument in a function application since this
would not make sense given the usual interpretation of state variables and
functions.
which doesn't explain much. In Mercury I think of predicates and functions
being basically the same except for syntax (cue horrified gasps from more
knowledgeable members of the audience), but I guess there's something deeper
than that here.
Also, it would be nice if the error message was a little clearer when you
try to do this.
Nick
--------------------------------------------------------------------------
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