Hi all, I am trying to port a library that I have developed using GHC and GHCi to Hugs. The problem is that it uses the FFI as specified in the GHC documentation. Hugs seems to understand the keywords "foreign import", but seems to give slightly different semantics to it. My question is: does anybody know what the status of the FFI is in the latest Hugs? Should I use the "primitive" keywords instead? Also, the GHC folks seem to have changed the libraries Foreign, Ptr, etc. and have made Addr obsolete. Also, they provide libraries like CForeign. Is there any hope that Hugs will be compatible with these changes sometime in the near future? /Koen. -- Koen Claessen http://www.cs.chalmers.se/~koen phone:+46-31-772 5424 mailto:koen@cs.chalmers.se ----------------------------------------------------- Chalmers University of Technology, Gothenburg, Sweden
At 11:17 +0200 2001/08/10, Koen Claessen wrote:
My question is: does anybody know what the status of the FFI is in the latest Hugs? Should I use the "primitive" keywords instead?
The strategy I used when implementing Apple high-level events on the MacHugs was to pass over strings only: I found two different foreign interfaces in the C source code, combined them in order to provide conversions back and forth to lazy Haskell/strict C strings. Then I hardwired some new primitives in a new module that must be loaded in order to call my extensions in C. Hans Aberg
participants (2)
-
Hans Aberg -
Koen Claessen