[nhc-users] FFI "wrapper"
Donn Cave
donn at avvanta.com
Mon Sep 22 02:32:13 EDT 2008
Just this weekend I got nhc98 running on a platform where I've wanted
a Haskell compiler for a long time, very thrilling. But of course
nothing's ever perfect, and apparently there's no foreign import "wrapper"
support, which I think is what I would use to pass Haskell functions to C.
Is there another way to do that? I'm looking at a C++ API where a class
virtual function would call back to a different function for each class
instance object, so while "foreign export" is a start, it doesn't do what
I need to do.
While I'm at it - if I manage to get callbacks working - they'll be
coming from various different OS-level threads, so ... I will need to
protect against concurrent execution, right?
Thanks!
Donn Cave, donn at avvanta.com
PS The platform is a revived/cloned open source version of BeOS,
called "Haiku". Haiku hasn't actually been released yet, but I've
run BeOS since it came out ca. '96. I'm sure I'm not the only one
who has ever wanted to compile Haskell on BeOS, but likely one of
only a handful.
More information about the Nhc-users
mailing list