[mercury-users] discriminated unions in c_code
Tyson Dowd
trd at cs.mu.OZ.AU
Thu Nov 30 16:48:52 AEDT 2000
On 30-Nov-2000, Michael Day <mikeday at corplink.com.au> wrote:
>
> > You could also export functions/predicates that do this, and call them
> > from C (make their inputs simple types such as strings or ints).
> >
> > Otherwise you have to start to concern yourself with how the compiler
> > will choose representations for the type.
>
> Oh right. Sounds like exporting would be a nice solution. This means I
> have to say will_call_mercury for the c_code predicates which call the
> exported Mercury predicates, I assume.
Yes.
The efficiency of this solution isn't great, it would be nice to have a
solution that is highly efficient too. But for most applications it
should be fine.
--
Tyson Dowd #
# Surreal humour isn't everyone's cup of fur.
trd at cs.mu.oz.au #
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list