Skip to content

Commit

Permalink
Document that Reason/Rescript is supported out of the box
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Kubica <marek@tarides.com>
  • Loading branch information
Leonidas-from-XIV committed Mar 19, 2024
1 parent f271143 commit d16d3c7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/reference/files/dune-project/dialect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

0 comments on commit d16d3c7

Please sign in to comment.