caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Josh Berdine <josh@berdine.net>
To: caml users <caml-list@inria.fr>
Subject: [Caml-list] [ANN] OCamlFormat
Date: Fri, 20 Oct 2017 17:24:01 +0100	[thread overview]
Message-ID: <5D4E4BAB-56A2-45E0-B1A7-8C1CA42C207D@berdine.net> (raw)

I'm pleased to announce the first release of OCamlFormat. [1]

OCamlFormat is a tool to automatically format OCaml code. It follows the same basic design as refmt for Reason code, but for OCaml. In particular, it works by parsing source code using the OCaml compiler's standard parser, deciding where to place comments in the parsetree, and printing the parsetree and comments in a consistent style.

We currently use this for the OCaml code of Infer [2] to enable developers to stop thinking about line breaking, indentation, parenthesization, etc., to minimize stylistic nit-picking during code review, and to make it as visually obvious as possible when the parser's interpretation of code does not match the programmer's. We use this both with integration with editors as well as a pre-commit hook.

Development is taking place at github.com/ocaml-ppx/ocamlformat.
License is MIT.

See the github page for more info on installation, documentation, contributing, etc.

An opam package will be available soon.

- Josh Berdine

[1] http://fbinfer.com/blog/2017/10/20/ocamlformat-released.html
[2] https://github.com/facebook/infer

                 reply	other threads:[~2017-10-20 16:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5D4E4BAB-56A2-45E0-B1A7-8C1CA42C207D@berdine.net \
    --to=josh@berdine.net \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).