Automatically derive dynamic linking methods from a data type. http://github.com/hsyl20/dynamic-linker-template
|Latest on Hackage:||0.1.1.0|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
This package uses Template Haskell to generate dynamic linking FFI methods from a record by using its field names. A load function is generated to create an instance of the data from a library path.
Optional symbols are supported (use Maybe types in the data structure).
A String->String method can be provided to deal with symbols whose names are not exactly the same as field names.
See https://github.com/hsyl20/dynamic-linker-template/blob/master/Tests/Test.hs for an example.