tweag / topiary

https://topiary.tweag.io/
MIT License
580 stars 29 forks source link

Multi-line functor type formatted as single-line #646

Closed Niols closed 1 year ago

Niols commented 1 year ago

As of 48659c7, Topiary formats:

module Make:
  functor (I: Interface.S) ->
  functor (_: Transport.S with type payload = I.data Payload.t) ->
  S

as

module Make:
  functor (I: Interface.S) -> functor (_: Transport.S with type payload = I.data Payload.t) -> S

I would expect it to respect the user's choice to make this type signature multi-line and to go for that kind of things, probably leaving the code as-is.

To reproduce:

$ nix run github:tweag/topiary/48659c7 -- format -l ocaml
module Make:
  functor (I: Interface.S) ->
  functor (_: Transport.S with type payload = I.data Payload.t) ->
  S
^D