
Hi Don,
I am looking at the code for ghc-6.8.2 but don't see the mmap support.
Is this newly wriiten by you? I would also like to help round out the Posix
functionality in Haskell. Is there an accurate list of what needs to be done
given the fact that maybe some work is in progress but not "checked in"?
Thank you, Vasili
On 1/16/08, Don Stewart
vigalchin:
Hi Don,
Sorry ..I wasn't clear enough.I am trying to determine from the Haskell FFI doc what datatype to use in order to model C's "void *", e.g. for mmap [1]http://www.opengroup.org/onlinepubs/000095399/functions/mmap.html
Regards, Vasili
In the System.IO.Posix.MMap module, mmap is imported as:
foreign import ccall unsafe "hs_bytestring_mmap.h hs_bytestring_mmap" c_mmap :: CSize -> CInt -> IO (Ptr Word8)
foreign import ccall unsafe "hs_bytestring_mmap.h munmap" c_munmap :: Ptr Word8 -> CSize -> IO CInt
You can see the full binding to mmap here:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bytestring-mmap
Cheers, Don