
25 Aug
2010
25 Aug
'10
8:47 p.m.
On 26 August 2010 10:41, Ken Takusagawa
What am I doing wrong?
module Ffi2 where { import Foreign.C.Types;
foo :: CInt -> CInt; foo x = x;
foreign export ccall foo :: CInt -> CInt;
}
Did you enable the
$ ghc -c Ffi2.hs
Ffi2.hs:8:0: Invalid type signature
You need to call it with -XForeignFunctionInterface to enable FFI methinks. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com