[haskell-llvm] llvm-general FFI dependencies

Scott West scott.west at inf.ethz.ch
Tue Aug 20 09:06:45 BST 2013


Hello Henning,

>> It's okay to put the data type into llvm-general-pure, as it's pure
>> Haskell - not dependent on any FFI.
>> It's weird to put it in llvm-general-pure, because it's not of much
>> external use at runtime except to pass to code in llvm-general.
>> It's weird to put it in llvm-general-ffi, because it's not FFI code.
> 
> If it does not fit in either package, could it be put into a separate
> package?

It's just one file with some datatype declarations and a few values. A
separate package is possible but it would be quite small, which may be
OK. Having a separate package does incur some overhead.

> 
> Btw. if the FFI package should be used widely I prefer it would not
> depend on so many GHC extensions like TemplateHaskell.
> 

The use of TemplateHaskell here automates much of the process that
should it easier to keep the maintenance burden down. For example
definitions from the LLVM headers are used to generate some of the FFI.

This helps reduce the situations where LLVM changes and we have to
manually tweak the FFI.

Did you have a use case that may help us understand why TH is undesirable?

Regards,
Scott



More information about the Haskell-llvm mailing list