Introduction
Working with LLVM in Haskell can be a bit tricky, as one needs to get:
- A proper LLVM suite.
- Matching Haskell bindings.
This repository demonstrates how to achieve this using the Nix package manager.
Getting started
- Install nix. The simplest way to do so
is to paste
curl https://nixos.org/nix/install | sh
in a terminal and follow the instructions. - Clone this repository and
cd
into it:git clone https://github.com/gdeest/llvm-demo.git cd llvm-demo
- Type
nix-shell
to enter a shell with all required dependencies:nix-shell
- Type
cabal build
to build the project. - Type
cabal run
to run the sample executable.
That's all folks ! Modify to your needs.