OCamlPro / ocp-indent

Indentation tool for OCaml, to be used from editors like Emacs and Vim.
http://www.typerex.org/ocp-indent.html
Other
200 stars 63 forks source link

regression in 1.7.0 alignment of type arguments #280

Closed mbarbin closed 5 years ago

mbarbin commented 5 years ago

I am seeing what appear to be a regression while trying to upgrade jane to 1.7.0. Tried to reduce it to a smaller code block below:

With 1.6.1:

module Unsafe_blit = struct
      external unsafe_blit
        :  src:t_
        -> src_pos:int
        -> dst:t_
        -> dst_pos:int
        -> len:int
        -> unit
        = "core_array_unsafe_int_blit"
      [@@noalloc]
    end

1.7.0 --config=JaneStreet

    module Unsafe_blit = struct
      external unsafe_blit
        :  src:t_
          -> src_pos:int
          -> dst:t_
          -> dst_pos:int
          -> len:int
          -> unit
        = "core_array_unsafe_int_blit"
        [@@noalloc]
    end

This is from core_kernel array.ml.

The arrows get aligned further to the right, which defeats the alignment of the first parameter with the others.