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. _____________________________________________ David Abbs 3rd year Undergraduate in Computer Science at the University Of Sheffield _____________________________________________ [EMAIL PROTECTED] Have a very nice day !!
|