GHC questions to ghc-users please, not the main Haskell list.
You need the -ffi flag to use the FFI.
-----Original Message-----
I am having problems with the GHC FFI, I am using GHC version 5.04.1 and am trying to compile the sample code given on the web site _______________________________________ module Foo where foreign export ccall foo :: Int -> IO Int foo :: Int -> IO Int foo n = return (length (f n)) f :: Int -> [Int] f 0 = [] f n = n:(f (n-1)) _____________________________________ when I enter c:/ghc M.hs to compile the code I get the following error M.hs:5: Type signature given for an expression I have tried compiling the code using GHC 5.04.1 on windows 98, XP and on Linux any help on would be greatly appreciated. _____________________________________________ Have a very nice day !! |
- problems with ghc ffi David Abbs
- Simon Peyton-Jones