llvm-hs - Haskell bindings for LLVM

This project aims to provide a relatively complete set of bindings for
the LLVM API. If you find that anything is missing please open an
issue! We generally try to stay close to the LLVM C++-API so you can
consult the LLVM documentation and reuse existing resources.
Getting started
If you’ve worked with LLVM before, take a look at the examples in the
llvm-hs-examples repo.
If not, you can find a translation of the official LLVM
tutorial
at https://github.com/llvm-hs/llvm-hs-kaleidoscope. There is also a
blog series on writing a C
compiler with the library. In general, we try to stay very close to
the API and AST provided by LLVM itself, so the LLVM language
reference is also very useful.
LLVM API Interface
llvm-hs provides an LLVM binding at (roughly) the same level of abstraction
as the official LLVM C API. Because of this, anything you might do with the
LLVM C API, you should expect to be able to do with llvm-hs. In addition,
some things which are not handled in the LLVM C API are supported. For example,
the LLVM C API does not provide any
support for working
with AttributeSet and AttributeList types, but llvm-hs does.