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-installNote that this will use
sudoat the end to install the library globally, for example placinglibsylvan.ainto/usr/local/lib/which is therefore mentioned in thestack.yamlfile 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."