Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] tuareg, parens and indentation

0 views
Skip to first unread message

Florian Hars

unread,
Nov 21, 2006, 3:13:07 PM11/21/06
to caml...@yquem.inria.fr
I can't seem to be able to get the same indentation from tuareg 1.46 that
I got from 1.45. While 1.46.1 is considerably less broken in this regard
than 1.46.0, it still messes up "one true paren style"
and matches (at least I couldn't find the parameter to get rid of
the two additional spaces). Code like this (from 1.45.2):

match foo with
| None ->
do_something ();
| Some bar -> (
match bar with
| `A -> ()
| `B -> ()
)

or

if cond then (
do_something ();
do_something_else ();
) else
do_yet_another_thing ();

ends up as:

match foo with
| None ->
do_something ();
| Some bar -> (
match bar with
| `A -> ()
| `B -> ()
)

and

if cond then (
do_something ();
do_something_else ();
) else
do_yet_another_thing ();

which is not only ugly (code at the same nesting level ends up on different
indentation levels), but also litters my repository with extensive, useless
whitespace-only patches.

Yours, Florian.

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Albert Cohen

unread,
Nov 23, 2006, 11:18:22 AM11/23/06
to Hendrik Tews
Yes, I'm sorry, versions 1.46.x are still broken, and I don't see the
light these days. Hopefully before the end of the year...

Albert

On Wed, Nov 22, 2006 at 08:56:44AM +0100, Hendrik Tews wrote:

> Florian Hars <ha...@bik-gmbh.de> writes:
>
> I can't seem to be able to get the same indentation from tuareg 1.46 that
> I got from 1.45. While 1.46.1 is considerably less broken in this regard
>

> Revert to 1.45.x, wait and pray. See
> http://caml.inria.fr/pub/ml-archives/caml-list/2006/09/854c5c335a3895f643693ebad1e5bfcc.en.html
>
> Even Debian etch has reverted.
>
> Bye,
>
> Hendrik


>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

--
Albert Cohen http://www-rocq.inria.fr/~acohen

0 new messages