Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Louis Gesbert <louis.gesbert@ocamlpro.com>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: caml-list@inria.fr, Christophe Raffalli <christophe@raffalli.eu>
Subject: Re: [Caml-list] type keyword indentation with tuareg
Date: Tue, 24 Jan 2017 14:00:31 +0100	[thread overview]
Message-ID: <4372910.SfsLsx3Fc8@agaric> (raw)
In-Reply-To: <1479F3A46A244541857BCDA472901816@erratique.ch>

`fun` does indeed get indented (by 2), as mentionned in the issue you linked to.
The issue Christophe Raffalli was having here had to do with the `type` keyword in the function type leading to a much higher indentation level, though, if I understood correctly: a problem that is apparently solved by either ocp-indent or a more recent version of Tuareg+SMIE.

Best,
Louis Gesbert - OCamlPro

> - Daniel Bünzli, 24/01/2017 13:35 -
> On Tuesday, 24 January 2017 at 09:46, Louis Gesbert wrote:
> > Try ocp-indent (http://opam.ocaml.org/packages/ocp-indent/) for better indentation, based on a token stack rather than regexps. It plugs in to tuareg easily.
> > 
> > (and gives:
> > 
> > let f : type a.a -> a =
> > fun x -> x
> > )
> 
> Is this released ? With [2], the `fun` gets indented. There's an old issue about this [1]
> 
> Best, 
> 
> Daniel
> 
> [1] https://github.com/OCamlPro/ocp-indent/issues/188
> [2]
> > ocp-indent --version
> 1.5.3
> > ocp-indent --print-config
> base = 2
> type = 2
> in = 0
> with = 0
> match_clause = 2
> ppx_stritem_ext = 2
> max_indent = 4
> strict_with = never
> strict_else = always
> strict_comments = false
> align_ops = true
> 
> align_params = auto

  reply	other threads:[~2017-01-24 13:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23  8:19 Christophe Raffalli
2017-01-24  8:46 ` Louis Gesbert
2017-01-24 11:47   ` Christophe Troestler
2017-01-24 12:35   ` Daniel Bünzli
2017-01-24 13:00     ` Louis Gesbert [this message]
2017-01-24 13:10       ` Daniel Bünzli

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=4372910.SfsLsx3Fc8@agaric \
    --to=louis.gesbert@ocamlpro.com \
    --cc=caml-list@inria.fr \
    --cc=christophe@raffalli.eu \
    --cc=daniel.buenzli@erratique.ch \
    /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