-
Notifications
You must be signed in to change notification settings - Fork 18
Home
First, we TutorialCreate an interface to Posix API. The http://hackage.haskell.org/package/bindings-posix can be seen on Hackage. Then, we build a simple http://en.wikipedia.org/wiki/Regular_expression parser on top of that API to show you TutorialUse.
bindings-DSL is based on http://hackage.haskell.org/package/hsc2hs. John Wiegley has created http://hackage.haskell.org/package/c2hsc (not to be confused with http://hackage.haskell.org/package/c2hs), a tool for automatically generating bindings-DSL files from C files, with the goal of solving "the hardest 80% of the problem of creating an FFI library." It does not handle entries related to the C pre-processor (such as macros), but should handle all other language constructs. At present (jan/2014), according to him, there are currently known issues with typedef'd enums, and recognizing function pointer typedefs correctly as callbacks, but otherwise it is in regular use by the hlibgit2 project and a few other projects as well. There are usage instructions and an issue tracker at its https://github.com/jwiegley/c2hsc at github.
- 2013/december: Tutorial example changed to use monad transformers.
- 2013/august: New documentation seems ready; #union_field marked as deprecated; #callback changed to #callback_t; bug corrected in multi-dimensional array fields, which had their sizes underestimated.
- 2013/july: Repository migrated to git.
- 2012/september: Fixed values of alignments in Storable instances; marked #gobject as deprecated, see https://github.com/Yuras/bindings-gobject.