Open Julow opened 1 year ago
Thanks! I don't have a strong opinion about the change (although I do like the fact that the whole body doesn't change indentation depending on whether there is a newline before the fun
) — but about this part:
The reason for this change is that a top-level-
let
can be interpreted as aLetIn
, for example:
That sounds like a bug that could be fixed, could you have a look at: https://github.com/OCamlPro/ocp-indent/pull/323/files#diff-d2b011b2196f3fb28d20777c036018fd9b3073c4211cfb45440815d778a987bbR942-R947
Thanks!
I fixed the detection of Let
in https://github.com/OCamlPro/ocp-indent/pull/324 but I think this PR also make sense as it fixes an inconsistency.
We've looked at this change on our code at Jane Street, the ouput looks fine and more consistent than before. I'm in favor of this change.
Apply the same indentation for:
and:
The reason for this change is that a top-level-
let
can be interpreted as aLetIn
, for example:We found this problem while working on OCamlformat for Janestreet. An other solution to this problem would be to correctly interpret the
let
. What do you think ?