Install the Haskell compiler via ghcup or other. https://www.haskell.org/ghcup/
sudo apt install git build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
Then quit terminal and relaunch.
Install the build dependencies for the k-MC checker:
cabal install cmdargs ansi-terminal parallel split MissingH parsec --lib
git clone https://github.com/julien-lange/kmc.git
cd kmc
git checkout jrk
ghc --make KMC.hs
cp KMC /usr/local/bin
bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)"
opam init --bare
opam swith create 4.12.0+domains
eval $(opam env)
export OPAMJOBS=16 # <- number of the cores
opam install dune domainslib ppxlib ppx_deriving ocaml-lsp-server
git clone https://github.com/keigoi/kmclib.git
cd kmclib
dune build
Or you can execute examples by:
dune exec test/paper/test.exe
(if you want to execute test.ml)
Install VSCode and OCaml Platform:
https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform
It depends on ocaml-lsp-server
which can be installed via opam install ocaml-lsp-server
.
Open the terminal, and type dune build -w
will re-run the build automatically when you save a file.