[m-dev.] purity of `:- pragma foreign_proc'
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Nov 1 21:58:32 AEDT 2001
On 01-Nov-2001, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> We also think that it would be nice to have a shortcut so that you don't
> have to write :- pragma promise_pure(...) when you write a foreign_proc.
>
> Let me collect the syntax proposals together:
>
> (1) :- pragma pure foreign_proc(...). % or semipure or impure
> (2) :- pragma promise_pure foreign_proc(...). % or promise_semipure
>
> and I'd like to throw in
>
> (3) :- pragma foreign_proc(..., [promise_pure]). % or promise_semipure
I really don't care. I could live with any of these.
I could also live with
(0) No shortcut, so you need to write two declarations:
:- pragma foreign_proc(..., foo(...), ...).
:- pragma promise_pure(foo/N).
which has the minor advantage of being easiest to implement.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "... it seems to me that 15 years of
The University of Melbourne | email is plenty for one lifetime."
WWW: <http://www.cs.mu.oz.au/~fjh> | -- Prof. Donald E. Knuth
--------------------------------------------------------------------------
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