[Haskell-cafe] foreign function interface "Invalid type signature"

Ken Takusagawa ken.takusagawa.2 at gmail.com
Wed Aug 25 20:55:20 EDT 2010


Thanks, that fixed it.

On Aug 25, 2010 8:47 PM, "Ivan Lazar Miljenovic" <ivan.miljenovic at gmail.com>
wrote:
> On 26 August 2010 10:41, Ken Takusagawa <ken.takusagawa.2 at gmail.com>
wrote:
>> 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 at gmail.com
> IvanMiljenovic.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100825/9ec01313/attachment.html


More information about the Haskell-Cafe mailing list