[m-dev.] multi-language definitions

Zoltan Somogyi zs at cs.mu.OZ.AU
Fri Feb 22 19:02:28 AEDT 2002


On 22-Feb-2002, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> On 22-Feb-2002, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> > - If a predicate or function has only foreign_procs, then it must have a
> >   foreign_only pragma and must not have a foreign_and_mercury pragma.
> 
> Do you mean if there are multiple foreign_procs?  Or will you need
> foreign_only if there is just one foreign_proc?

Is that a distinction that is important in practice? Surely we should
encourage people to provide definitions of their predicates that will work
for all back ends (even if on some back ends, they only call "sorry"),
which means that all predicates that have no Mercury clauses *should*
have multiple foreign_procs.

> I'm not particularly keen on having it if there is just one
> foreign_proc.  

The error message you would get if you had only one foreign_proc and no
foreign_only pragma would serve as a reminder that you should add either
foreign_procs for all the other back ends or a default clause in Mercury.

Zoltan.
--------------------------------------------------------------------------
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