caml-list - the Caml user's mailing list
 help / Atom feed
From: Francois Berenger <mlists@ligand.eu>
To: Kenichi Asai <asai@is.ocha.ac.jp>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] line breaking
Date: Mon, 14 Jun 2021 09:54:11 +0900
Message-ID: <d346706792e538811c9847cb571cad38@ligand.eu> (raw)
In-Reply-To: <20210611061824.GA5373@pllab.is.ocha.ac.jp>

On 11/06/2021 15:18, Kenichi Asai wrote:
> Once line breaks are inserted, one can use ocp-indent to properly
> indent OCaml code.  Is there a tool to insert line breaks (somehow) to
> OCaml code that are written with insufficient (or no) line breaks?

The unix command 'fmt --width 80' might fill the bill. No?

> I could think of writing a compiler (using compiler-libs) that parses
> the input and immediately pretty print it, but that would remove all
> the comments in the program.

      parent reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11  6:18 Kenichi Asai
2021-06-11  6:21 ` Basile Clement
2021-06-14  0:54 ` Francois Berenger [this message]

Reply instructions:

You may reply publically 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=d346706792e538811c9847cb571cad38@ligand.eu \
    --to=mlists@ligand.eu \
    --cc=asai@is.ocha.ac.jp \
    --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

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror https://inbox.ocaml.org/caml-list

AGPL code for this site: git clone https://public-inbox.org/ public-inbox