[m-dev.] Ordered conjunction
Robert Jeschofnik
rejj at students.cs.mu.oz.au
Fri Aug 25 15:04:02 AEST 2000
On 25-Aug-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 24-Aug-2000, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> > Ralph Becket <rbeck at microsoft.com> writes:
> >
> > > I know this has come up before, but I just want to restate the case
> > > for an ordered conjunction (P && Q) which constrains the compiler to
> > > call P before Q (for && pick the symbol of your choice).
> >
> > What about `then'? It seems to me that it a degenerated case of
> > if-then-else where there is no `else' branch (or where the `else'
> > branch it equivalent to `fail').
>
> You're right about the semantics of `P && Q' being the same
> as `if P then Q else fail' or `P -> Q ; fail'.
What about scoping, though?
In `(P -> Q ; fail), R' I'm not allowed to use variables that are bound inside
P, instead they must be bound inside Q.
It would not make much sence to enforce this same restriction on `P && Q, R'.
Rob
--------------------------------------------------------------------------
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