scope of header files

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Wed Mar 5 18:16:14 EST 2008


I was under the impression that with ghc, ffi import declarations like
this do not escape the module:

foreign import ccall unsafe "foo.h foo" foo :: IO ()

However it seems that this one does:

foreign import ccall unsafe "curses.h & stdscr" stdscrp :: Ptr WINDOWptr

from:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mage-1.0

perhapsPbecause it's a pointer import it gets treated differently?

Is this correct and expected behaviour?

It's hard to tell what header files need to be used globally and
inherited by client packages and which can safely be used privately.

Duncan



More information about the Glasgow-haskell-users mailing list