A Haskell package containing combinators that are useful when generating LLVM code using the llvm-hs-pure library.
- Add
llvm-hs-combinators
to your package.yaml dependencies, - Point llvm-hs-pure to a recent commit (e.g. the llvm-9 branch or newer),
- Import
LLVM.IRBuilder.Combinators
in your Haskell code!
For an example of how to do this, see here and here.
Unlike llvm-hs / llvm-hs-pure, this library does not take the LLVM version into account, since it only makes use of the Haskell functions exposed by the libraries (that are unlikely to change).
Right now, this library is not on Hackage due to llvm-hs-pure not having a release that contains the improved handling of terminators in the IRBuilder. As soon as this is done, this library can be released to Hackage as well. You can however still use this library if you pull it directly from Github!