General


General

[@tailcall]

Error will be like this:

Error (warning 51 [wrong-tailcall-expectation]): expected tailcall

Line number directives

Import only some names from a module

Unlike Haskell, no such facility is available.

But this should be good enough:

let value1, value2 = ModuleName.(value1, value2) 

https://stackoverflow.com/questions/38937520/ocaml-open-only-certain-values-types-from-module

Emacs: tuareg mode

Can work with utop.

https://ocamlpro.github.io/ocaml-cheat-sheets/tuareg-mode.pdf


Tuareg: Emacs major mode for OCaml.

Insert template code snippet:

ocamlformat

An automatic code formatter.

dune integration (needs setup in dune-project):

utop

https://www.systutorials.com/utop-key-bindings-key-shortcuts/

ppx

Links:

Eg:

[@@deriving _]

odoc

https://ocaml.github.io/odoc/

List: ul, ol

String formatting

Alignment: