The Binding Generator C->Haskell : The Haskell FFI Marshalling Library
Previous: Grammar Rules
Next: Bug Reports and Suggestions

## 3. The Haskell FFI Marshalling Library

The Haskell FFI Marshalling Library is a proposed standard library for foreign function interoperability. The interface of the `C2HS` marshalling library is a slight extension of the Haskell FFI Marshalling Library, which is documented in the following.

The library is partitioned into a language independent and a C specific component. All features of the former are available from the module `Foreign` and all features of the later from `CForeign`. Nevertheless, the following module hierarchy is part of the interface definition:

- Foreign
  - Int
  - Word
  - Ptr
  - ForeignPtr
  - StablePtr
  - Storable
  - MarshalAlloc
  - MarshalArray
  - MarshalError
  - MarshalUtils
- CForeign
  - CTypes
  - CTypesISO
  - CError
  - CString

It is recommended to access this functionality in C->Haskell binding modules by merely importing `C2HS`.

The Binding Generator C->Haskell : The Haskell FFI Marshalling Library
Previous: Grammar Rules
Next: Bug Reports and Suggestions