Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Experimental high-level libffi interface
C Haskell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
cbits
examples
include
src/Foreign
.gitignore
README.md
Setup.lhs
libffi-experiments.cabal

README.md

libffi-experiments

As the name suggests, this is an experimental Haskell binding to the libffi library.

The novel thing about this implementation is that it defines a variadic function "dynamic" (and hopefully soon an inverse, "wrap") that imports an arbitrarily-typed FunPtr as long as the types used as arguments and return are all instances of either the ArgType or RetType class, respectively. Those classes can be implemented fairly easily, even for complex types such as structs.

The code is fairly ugly at this point. I threw this together pretty quickly and I'm not sure how much of the complexity is incidental.

Something went wrong with that request. Please try again.