[m-dev.] for discussion: proposed additions to FFI

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Jun 24 14:50:47 AEST 2008

On Tue, 24 Jun 2008, Ralph Becket wrote:

> Julien Fischer, Monday, 23 June 2008:
>> This proposal extends the FFI with three new pragmas that allow for the
>> construction, deconstruction and testing of individual discriminated union
>> data constructors in foreign language code.
> I think this is a reasonable idea, although I wonder whether in
> practice you're almost always going to want all three operations
> (cons/decons/test), which might mean having a single pragma to generate
> all three would be better.

How about listing the desired operations in a single pragma, something

 	:- pragma foreign_export_du_op("C", maybe, yes,
 		[test("TEST_yes"), cons("MAKE_yes"),

mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au

More information about the developers mailing list