Unboxed types and FFI (GHC Users Guide, Section 8.1.1)

Dimitry Golubovsky golubovsky at gmail.com
Fri Dec 30 08:39:58 EST 2005

The section 8.1.1 of the GHC User's Guide says this:

The following unboxed types may be used as basic foreign types (see
FFI Addendum, Section 3.2): Int#, Word#, Char#, etc

Does this mean that when declaring a foreign function import for a C function

int fun(int)

I may write

foreign import ccall "bla.h fun"

fun :: Int# -> Int#

instead of using CInt?

Are there any examples of using unboxed types with FFI?
Dimitry Golubovsky

Anywhere on the Web

More information about the Glasgow-haskell-users mailing list