[mercury-users] Impurity annotations on modes?

Ralph Becket rafe at cs.mu.OZ.AU
Thu Jun 30 16:01:33 AEST 2005

Peter Hawkins, Thursday, 30 June 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?

Not at the mo.  Anyone interested in doing a Ph.D. on mode polymorphism
(which is something that *really* needs research) should apply within!
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