[m-dev.] multi-language definitions

Holger Krug hkrug at rationalizer.com
Fri Feb 22 19:31:01 AEDT 2002


On Fri, Feb 22, 2002 at 07:02:28PM +1100, Zoltan Somogyi wrote:

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

Is that really necessary ? For a backend for which no definition
exists, you could simply produce a function call (method call) in the
target language and, if supported by the target language, a function
declaration. And print out a *warning* that these functions still have
to be implemented in the target language *or* defined within
Mercury. Either the compiler or the linker of the target language then
would raise the error message.

-- 
Holger Krug
hkrug at rationalizer.com
--------------------------------------------------------------------------
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