tuareg icon indicating copy to clipboard operation
tuareg copied to clipboard

Indentation of infix extension in `try` blocks

Open atemp opened this issue 5 years ago • 0 comments

If an infix extension is added to a try, the expression is indented by 6 spaces instead of 2:

let _ =
  try%lwt
        1
  with
    _ -> 2

A try without an extension works:

let _ =
  try
    1
  with
    _ -> 2

IMHO the try%lwt should be indented like that:

let _ =
  try%lwt
    1
  with
    _ -> 2
  • try is defined here: https://ocaml.org/releases/4.11/htmlman/expr.html
  • infix extensions are defined here: https://ocaml.org/releases/4.11/htmlman/extensionnodes.html

atemp avatar Oct 26 '20 22:10 atemp