From d16d3c71a97382edcd54e46747d3b92a5419c90a Mon Sep 17 00:00:00 2001 From: Marek Kubica Date: Mon, 18 Mar 2024 17:28:17 +0100 Subject: [PATCH] Document that Reason/Rescript is supported out of the box Signed-off-by: Marek Kubica --- doc/reference/files/dune-project/dialect.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/reference/files/dune-project/dialect.rst b/doc/reference/files/dune-project/dialect.rst index 0327602d8ce7..7573e89a6f5d 100644 --- a/doc/reference/files/dune-project/dialect.rst +++ b/doc/reference/files/dune-project/dialect.rst @@ -65,3 +65,20 @@ dialect This field supports the same sub-fields as ``implementation``. .. versionchanged:: 3.9 This field is made optional. + + +Default dialects +---------------- + +In the default configuration Dune comes with two dialects pre-set and enabled: + +* `ocaml` for the default OCaml syntax which consumes `.ml` and `.mli` files + and uses `ocamlformat` for formatting. +* `reason` for the Reason syntax and enabled in `.re`/`.rei` files. For + formatting `refmt` is used. + +When `(using melange)` is enabled in the `dune-project` a third dialect is +enabled: + +* `rescript` for the ReScript syntax which is used in `.res` and `.resi` files. + The formatter in this case is `rescript_syntax`.