> What is the politically correct way using the FFI and ghc5.03 > (which I have just managed to compile from > CVS) to import an externally defined object (not a function)? > I have a source file containing the line > > foreign label "default_options" defaultOptions :: CString.CString > > for which ghc5.03 complains about "Warning: foreign > declaration uses deprecated non-standard syntax", > but which works anyway. However in my attempt to be a good > little ghc user, I try instead > > foreign import "default_options" defaultOptions :: CString.CString > > (after deciphering with difficulty the Postscript version of > the FFI document on this screen) but > still get the deprecated warning. Then I try > > foreign import ccall "default_options" defaultOptions :: > CString.CString
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/) Cheers, Simon _______________________________________________ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users