Importing a reference to a non-function entity.

George Russell ger@tzi.de
Wed, 20 Feb 2002 15:37:33 +0100


Simon Marlow wrote:
[snip]
> I believe you meant to say
> 
>   foreign import ccall "&default_options"
>      defaultOptions :: CString.Cstring
> 
> :-)  (see the latest FFI addendum at http://www.cse.unsw.edu.au/~chak/haskell/ffi/)
[snip]

Yes, it works, brilliant!  And I can specify the C header file too, rather than having to
hack it unreliably using a pragma at the top of the file.