-
Notifications
You must be signed in to change notification settings - Fork 18
Home
First, we create an interface to Posix API. The result can be seen on Hackage. Then, we build a simple regular expression parser on top of that API to show you how to use it.
bindings-DSL is based on hsc2hs. John Wiegley has created c2hsc (not to be confused with 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 project page 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 bindings-gobject.