[m-dev.] use of require/1 and mode error?

Andrew Bromage bromage at cs.mu.oz.au
Mon Sep 15 11:27:40 AEST 1997


G'day.

Fergus Henderson wrote:

> > > -	% XXX use of `require' is a bug (should be a mode error)
> > > -	{ require(laplace(X), "laplace failed\n") },

> A higher-order term (such as the first argument to require/1)
> is not allowed to have any partially applied output arguments,
> because (a) it might be called any number of times, and (b)
> it might be called inside negations.  But laplace(X) does bind `X'.
> (a) is not a problem for `any' insts, but (b) is, so it
> should be an error.

I realise this is early Monday and I'm not thinking straight, but
why wouldn't (some [X] laplace(X)) work?

Cheers,
Andrew Bromage



More information about the developers mailing list