GHC questions to ghc-users please, not the main Haskell list.
You need the -ffi flag to use the FFI.
S
-----Original Message-----
From: David Abbs
[mailto:u0da2@dcs.shef.ac.uk]
Sent: 04 November 2002 14:38
To: haskell@haskell.org
Subject: problems with ghc ffi
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 Intfoo n = return (length (f n)) f :: Int -> [Int]f 0 = []f n = n:(f (n-1))_____________________________________when I enterc:/ghc M.hs to compile the code I get the following errorM.hs:5: Type signature given for an expressionI have tried compiling the code using GHC 5.04.1 on windows 98, XP and on Linux any help on would be
greatly appreciated._____________________________________________
David Abbs 3rd year Undergraduate in Computer Science
at the University Of Sheffield
_____________________________________________
u0da2@dcs.shef.ac.ukHave a very nice day !!