Sven Panne writes:
> 
>    * foreign is a little bit buggy:
>         module Test where
>         foreign export _ccall "bar" myBar :: IO ()
>         myBar = putStrLn "Hi!"
>      leads to
>         panne:~/tst > ghc -c -fglasgow-exts Test.hs
>         ghc: module version changed to 1; reason: no old .hi file
>         /tmp/ghc7265.hc:118: macro `STK_CHK' used with too 
> many (7) args
>      Test_stub.h contains another surprise:
>         #include "rtsdefs.h"
>         extern void bar (void* _a0) ;
>      Where is the void* coming from? I expected: extern void 
> bar(void);
> 

'foreign export' doesn't work with ghc-4.00 just yet, use ghc-3.03
if you need it.

--Sigbjorn

Reply via email to