[mercury-users] Idea for another handy convention (preds, this time).

David Overton dmo at cs.mu.OZ.AU
Thu Jul 27 10:54:53 AEST 2000


On Thu, Jul 27, 2000 at 08:31:53AM +1000, Thomas Charles CONWAY wrote:
> 
> Of course an even better alternative would be to have mode inference
> do the job for me so that I could write:
> 
> doctypedecl -->
>     lit("<!DOCTYPE")		    then (pred(_) -->
>     s				    then (pred(_) -->
>     name			    then (pred(Root) -->
>     ...
> 
> and have the analysis do the rest.
> Maybe this will become more feasible with constraint-based mode
> analysis. Dave? Peter?

Yes, I think it should, but I haven't quite worked-out the best way to
handle mode analysis of higher order terms yet.

In cases like this, where the pred expression is being passed as a
higher-order argument to another predicate, it should be possible to
infer the mode of the pred expression by looking at the mode(s)
declared for the predicate it is being passed to.


David
-- 
David Overton      Department of Computer Science & Software Engineering
PhD Student        The University of Melbourne, Victoria 3010, Australia
+61 3 8344 9159    http://www.cs.mu.oz.au/~dmo
--------------------------------------------------------------------------
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