foreign funciton invokation
Chen Yu
chenyu888@hotmail.com
Sun, 23 Sep 2001 05:23:44 +0000
<html><div style='background-color:'><DIV>
<DIV>
<DIV>hi, there,</DIV>
<DIV> can someone check what's wrong with the following code?</DIV>
<DIV>as well, do i need to tell ghc to look for libcdata.so under /usr/local/lib </DIV>
<DIV> </DIV>
<DIV>source:</DIV>
<DIV>-------------</DIV>
<DIV>module Main where<BR><BR>foreign import "cdata" "ghc_cd_int_init" cd_int_init :: Int32 -> ForeignPtr<BR><BR>main = do<BR> c <-ghc_int_init(23)<BR></DIV>
<DIV> </DIV>
<DIV>compiling error<BR>--------------------<BR>ghc --make Main.hs -o test -package data -ltermcap<BR>ghc-5.00.2: chasing modules from: Main.hs<BR>Compiling Main ( Main.hs, ./Main.o )<BR>Main.hs:3: parse error on input `import'<BR></DIV></DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_itl_EN.asp'>http://explorer.msn.com</a><br></html>