- Mohamed Laidouni
- Eliot Friedman
- Ilian Crague
- Victor Morel
Install Opam, the OCaml package manager, on your system. Since your system runs Guix, you can easily obtain a suitable throw-away programming environment using
$ guix shell -m .guix/manifest.scm
For convenience, we setup a local Opam distribution, using the following commands:
$ opam switch create .
$ eval $(opam env)
Install Dune, the OCaml build system, using Opam:
$ opam install dune
Make sure that your text editor applies OCamlformat each time a file is modified, this helps settle styling war and avoids line-noisy patches down the line.
In Emacs, this amounts to adding the following lines to your .emacs
configuration file:
(require 'ocamlformat)
(add-hook 'tuareg-mode-hook (lambda ()
(define-key tuareg-mode-map (kbd "C-M-<tab>") #'ocamlformat)
(add-hook 'before-save-hook #'ocamlformat-before-save)))
If need be, you can invoke Dune to re-format the whole codebase:
$ dune fmt
To build the project, type:
$ dune build
For continuous build, use
$ dune build --watch
instead.
To run the project, type:
$ dune exec omizer2mizer
To test the project, type:
$ dune runtest
This can be combined with continuous build & test, using
$ dune runtest --watch