The GreenCard manual promotes use of the FFI target (`You're encouraged to use the ffi target, since the Haskell output it generates can be used with all Haskell systems that support the common FFI (as of June 2001, all of them).'), but doesn't give any examples for using it. In the distribution there is an StdDIS.gc for Hugs and another for GHC, but what should I import with the FFI target? The C stub #includes HsFFI.h, which GHC provides, but Hugs doesn't. What should I use? If I go ahead using what I have, Hugs says that `initModule undefined' when I try to load the GC module. Any help appreciated. Feri.
The C stub #includes HsFFI.h, which GHC provides, but Hugs doesn't. What should I use?
Hugs ffi support currently lags a long way behind the ffi specification (or implements something else entirely depending on your point of view). At the moment, Hugs' ffi doesn't work with GreenCard and isn't compatible with GHC and NHC. I'm trying to update Hugs' ffi implementation in my spare time. A
Alastair Reid <reid@cs.utah.edu> writes:
At the moment, Hugs' ffi doesn't work with GreenCard
Thanks for the input. It's not a big problem, since GC has native Hugs target. But the GC docs should be corrected then. (CCd to sof at galois.com)
and isn't compatible with GHC and NHC. I'm trying to update Hugs' ffi implementation in my spare time.
Your help (previous answers) is very valuable for me, thanks for taking time again! Feri.
participants (2)
-
Alastair Reid -
Ferenc Wagner