[mercury-users] Impurity annotations on modes?

Peter Hawkins peter at hawkins.emu.id.au
Thu Jun 30 13:58:46 AEST 2005


Hi...

Is it possible for some modes of a predicate to be impure, but not others?
In particular I would like to write this code:

:- func ask_var_value(constraint_variable) = value_type.
:- impure mode ask_var_value(ia) = (out) is det.
:- mode ask_var_value(in) = (out) is det.

(In other words, it's only impure to ask the value of a variable if it 
isn't known to be ground)

Doable?

=)
Peter

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