[m-dev.] for discussion: pragma foreign_import
Simon Taylor
stayl at cs.mu.OZ.AU
Thu Dec 6 04:29:49 AEDT 2001
On 05-Dec-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> > > :- func cos(float) = float.
> > > :- pragma foreign_import(il, cos(in) = out,
> > > ".method public static float64 Cos(float64)"
> >
> > Can I suggest using a different name.
> >
> > `foreign_import' is very similar to `foreign_import_module' but
> > they have very different meanings. Maybe `foreign_call' or
> > `foreign_proc_call' would be better (this is really just a shorthand
> > for a `:- pragma foreign_proc' declaration containing only the call).
> I was actually planning to switch to using `:- pragma import' but while
> developing the new change I was going to accept both syntaxes, just to
> make it clear which was which.
>
> However if we decide to keep both versions then I am more than happy to
> make the change.
All of the other foreign language interface declarations are
being renamed to `:- pragma foreign_...', so for consistency
`:- pragma import' should be renamed as well.
Simon.
--------------------------------------------------------------------------
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