The accelerate-llvm-native package

[Tags:bsd3, library]

This library implements a backend for the Accelerate language which generates LLVM-IR targeting multicore CPUs. For further information, refer to the main accelerate package.


Haskell dependencies are available from Hackage. The following external libraries are alse required:

Installing LLVM


Example using Homebrew on macOS:

 brew install llvm-hs/homebrew-llvm/llvm-4.0

Debian & Ubuntu

For Debian/Ubuntu based Linux distributions, the website provides binary distribution packages. Check for instructions for adding the correct package database for your OS version, and then:

 apt-get install llvm-4.0-dev

Building from source

If your OS does not have an appropriate LLVM distribution available, you can also build from source. Detailed build instructions are available on Make sure to include the cmake build options -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON so that the libLLVM shared library will be built.

Installing accelerate-llvm

To use accelerate-llvm it is important that the llvm-hs package is installed against the libLLVM shared library, rather than statically linked, so that we can use LLVM from GHCi and Template Haskell. This is the default configuration, but you can also enforce this explicitly by adding the following to your stack.yaml file:

     shared-llvm: true

Or by specifying the shared-llvm flag to cabal:

 cabal install llvm-hs -fshared-llvm


Dependencies accelerate (==1.0.*), accelerate-llvm (==1.0.*), base (>=4.7 && <4.10), containers (==0.5.*), directory (>=1.0), dlist (>=0.6), fclabels (>=2.0), libffi (>=0.1), llvm-hs (==4.0.*), llvm-hs-pure (==4.0.*), mtl (>=2.2.1), time (>=1.4) [details]
License BSD3
Author Trevor L. McDonell
Maintainer Trevor L. McDonell <>
Category Compilers/Interpreters, Concurrency, Data, Parallelism
Bug tracker
Source repository head: git clone
this: git clone
Uploaded Fri Mar 31 09:01:18 UTC 2017 by TrevorMcDonell
Updated Thu May 18 01:08:01 UTC 2017 by TrevorMcDonell to revision 2
Distributions NixOS:
Downloads 104 total (13 in the last 30 days)
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI




debugEnable debug tracing message flags. Note that 'debug' must be enabled in the base 'accelerate' package as well. See the 'accelerate' package for usage and available options.DisabledAutomatic
bounds-checksEnable bounds checkingEnabledAutomatic
unsafe-checksEnable bounds checking in unsafe operationsDisabledAutomatic
internal-checksEnable internal consistency checksDisabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees