A toy example showing how to get started with the Haskell bindings for Sylvan.
-
Install dependencies:
sudo apt install hwloc libhwloc-dev libgmp-dev
-
Get, compile and install Sylvan:
make sylvan-clone-patch-make-install
Note that this will use
sudo
at the end to install the library globally, for example placinglibsylvan.a
into/usr/local/lib/
which is therefore mentioned in thestack.yaml
file here. -
Compile the Haskell code:
stack build
-
Run it:
stack exec sylvan-haskell-example
- Currently this example only works with Sylvan 1.0.0. To update, the Haskell bindings have to be updated first. Note that the Sylvan changelog says for version 1.7.0 "Support for Sylvan as a shared library is removed."