|
RE: bug with -O -ffi and multiple module: msg#00069lang.haskell.glasgow.bugs
> Okay, here's a weird one. There's something wrong with the > ffi when using > -O and the foreign imports are from another module. For example, our > foreign module, foo.c contains functions: > > void* openFile(char*fn); > void closeFile(void*f); > float readFloat(void*f); > > which are interfaced from foo.h. We have a FooIntr.hs interface file, > which looks like: > > foreign import ccall "foo.h openFile" c__openFile :: Ptr > CChar -> IO > (Ptr ()) > foreign import ccall "foo.h closeFile" c__closeFile :: Ptr > () -> IO () > foreign import ccall "foo.h readFloat" c__readFloat :: Ptr () -> IO > CFloat I think what you're seeing here is an instance of this bug: http://sourceforge.net/tracker/index.php?func=detail&aid=655400&group_id =8032&atid=108032 Workaround: use -#include instead of including the header file in the FFI spec. Cheers, Simon
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Bizarre Haskell Problem, Matthew Donadio |
|---|---|
| Next by Date: | RE: Bizarre Haskell Problem, Simon Marlow |
| Previous by Thread: | bug with -O -ffi and multiple module, Hal Daume III |
| Next by Thread: | Bizarre Haskell Problem, Matthew Donadio |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |