[m-dev.] if-then goals

Ralph Becket rafe at cs.mu.OZ.AU
Thu Jul 24 16:43:02 AEST 2003


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, he only place where such goals could appear was in DCGs.
They existed for abuses of DCGs where DCGs were used to hide the IO
state and it was sometimes convenient to have just if-then rather than
the full if-then-else.

So on that basis, I'd rather not see un-elsed if-thens in the language.

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