[jhc] foreign exports

Anton Nikishaev me at lelf.lu
Mon Oct 1 01:18:14 CEST 2012


Is jhc ignoring foreign exports?  Or am I doing something wrong?

$ cat m.hs
module Main where
import Foreign.C

foreign export ccall "foo" foo :: CInt -> CInt
foo = const 42

main = print $ foo 0


$ jhc -fffi -C --tdir=m m.hs
jhc -fffi -C --tdir=m m.hs
jhc 0.8.1 (-n 0.7.7-14
   …
Writing "m/main_code.c"



$ grep -R foo m/
$ 




More information about the jhc mailing list