Skip to content

OCaml

  1. Make sure the dependencies are installed, as listed in the package list.

  2. Install opam

    Terminal window
    bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh)"
  3. Init opam

    Terminal window
    opam init
  4. When prompted where to put the integration, which defaults to .bash_profile, change it to another path and append the contents to your .bashrc

    ~/.bashrc
    # BEGIN opam configuration
    # This is useful if you're using opam as it adds:
    # - the correct directories to the PATH
    # - auto-completion for the opam binary
    # This section can be safely removed at any time if needed.
    test -r '/home/<username>/.opam/opam-init/init.sh' && . '/home/<username>/.opam/opam-init/init.sh' > /dev/null 2> /dev/null || true
    # END opam configuration
  5. Install the devtools

    Terminal window
    opam install ocaml-lsp-server odoc ocamlformat utop