Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Romain Bardou <Romain.Bardou@lri.fr>
To: caml-list <caml-list@inria.fr>
Subject: New Tuareg Mode
Date: Tue, 20 Jul 2010 16:53:54 +0200	[thread overview]
Message-ID: <4C45B882.7060805@lri.fr> (raw)

Hello,

So I've updated my Debian a few weeks ago and it updated tuareg-mode. 
It's great to know that Tuareg is still maintained. I remembered seeing 
a thread here with some reproaches, about colors or something. Well I 
don't really care about colors, they have always been ugly anyway. 
However I do care about indentation and there was a modification that I 
don't really like. The following code:

let f = function
   | A ->
       1
   | B ->
       2

match x with
   | A ->
       1
   | B ->
       1

is now indented like this:

let f = function
   | A ->
     1
   | B ->
     2

match x with
   | A ->
     1
   | B ->
     1

I find it less readable. I don't care about indenting too much on the 
right : if the indentation is too large I can simply cut the code into 
several functions. Which is good practise anyway.

Problem is, I can't find a way to configure Tuareg to indent 
pattern-matching the way it did before. I tried to change everything 
related to |, with, and -> with no success.

Note that I would probably be fine with:

let f = function
| A ->
     1
| B ->
     2

match x with
| A ->
     1
| B ->
     1

although I prefer the original version.

Any idea? Now, I now that it's just a matter of taste and that it's not 
really important, so if nothing can be done, so be it.

-- 
Romain Bardou


             reply	other threads:[~2010-07-20 14:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20 14:53 Romain Bardou [this message]
2010-07-20 15:36 ` [Caml-list] " Julien Signoles

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=4C45B882.7060805@lri.fr \
    --to=romain.bardou@lri.fr \
    --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