[m-dev.] if-then goals

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Jul 24 17:01:42 AEST 2003


On 24-Jul-2003, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> Julien Fischer, Thursday, 24 July 2003:
> > 
> > The compiler currently has code for handling goals of the form (if A then B)
> > or (A -> B).  However the code in the parser for handling these
> > is commented out, with the reason being given that because the
> > semantics for standard prolog (A -> B ; fail) are different from those
> > for Mercury, (A -> B ; true) this is disallowed for the moment?
> > 
> > Is the "moment" up?  If so, can we enable support for goals of this sort?
> 
> As I recall, [t]he only place where such goals could appear was in DCGs.

The commented out code that Julien Fischer is talking about is for
ordinary goals as well as for DCGs.  Of course for ordinary goals
it wasn't very useful -- it has the same meaning as `A => B' --
but that was before we had state variable notation.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list