Skip to content

Odd behaviour when mixing infix operators with comments #961

@craigfe

Description

@craigfe

OCamlformat currently converts the following input

let () =
  (* Open the repo *)
  initialise >>=
  (* Perform a subsequent action *)
  subsequent_action >|=
  (* Keep going... *)
  another_action |> fun t ->
  (* And finally do this *)
  final_action t

to this output:

let () =
  (* Open the repo *)
  initialise >>= (* Perform a subsequent action *)
                 subsequent_action >|= (* Keep going... *)
                                       another_action
  |> fun t ->
  (* And finally do this *)
  final_action t

which looks odd to me.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions