ocaml/tuareg — pull request #10 by jathd (2014-06-08 23:18:20+00:00)
Title: Fix inconsistent indentation of type definitions.

With `tuareg-type-indent` set to `2`, `tuareg-default-indent` to `3`,
and smie disabled, type definitions are indented like this:

type a =
Bar
| Foo

type b =
[ `Foo
| `Bar ]

type c =
{ foo : int }

type d =
a * b

This patch fixes the indentation so that:

1. `[`, `|`, `{` and type aliases all get an indentation of
`tuareg-type-indent` relative to `type`.

2. Even when the first constructor in a sum type is not preceded by a
`|`, it is still aligned with the other constructors.

In other words:

type a =
Bar
| Foo

type b =
[ `Foo
| `Bar ]

type c =
{ foo : int }

type d =
a * b