[m-users.] Foreign code stubs
Julien Fischer
jfischer at opturion.com
Mon Apr 8 11:20:07 AEST 2013
Hi,
On Mon, Apr 8, 2013 at 11:13 AM, Paul Bone <paul at bone.id.au> wrote:
>
> Is there a way to have the compiler not warn for missing foreign code stubs
> without using the over-permissive --allow-stubs option? For example, if I
> have forign code stubs for C (the C backend support in my program is
> complete) but I have only implemented some of the stubs for Java. Can I
> dsable the error when I compile the Java backend for any predicate that
> doesn't have Java foreign code but does have C foreign code. Without
> disabling the error for native Mercury predicates with no clauses?
No, there isn't. You can always add a Mercury clause for any such predicate
though (i.e. one that calls error or unimplemented). In the absence
of a foreign_proc
in the target language, the compiler will fall back to using that
Mercury clause.
Cheers,
Julien.
More information about the users
mailing list