[I'm forwarding this to the glasgow-haskell-users list, since it
is ghc specific. -- David]
------- Forwarded Message
From: [EMAIL PROTECTED] (Joachim Schmid)
Date: Tue, 8 Jul 1997 12:14:54 +0200
To: [EMAIL PROTECTED]
Subject: C-Calls
I want to call c-routines in my haskell program. In the documentation I found
the following example:
module GHCmain ( mainPrimIO ) where
import PreludeGlaST
mainPrimIO :: PrimIO ()
mainPrimIO = do
sleep 5
_ccall_ printf "%d\n" (14::Int)
sleep :: Int -> PrimIO ()
sleep t = _ccall_ sleep t
Compiling with ghc-2.02 results to
GHCMain.hs:11:1: wildcard in expression on input: "sleep"
Can anybody help me or give me an example that works ?
------- End of Forwarded Message