tuareg
tuareg copied to clipboard
OCaml keywords as extension names confuses indentation
If the name of an extension node is an OCaml keyword, the indentation mode gets extremely confused. I have observed this in at least two scenarios. Once when trying to add a monadic do block as in:
begin%do
...
end
In another example, using the ppxlib.metaquot
functionality and the type
extension deeply confuses Tuareg, e.g.
match x with
| [%type: int] -> ...
I understand for the first (and it is not related to the fact that it is %do
) but the second is indented as
let _ =
match x with
| [%type: int] -> x
| u -> v
which looks fine to me.
Interesting, in my version of Tuareg, I get the following indentation:
let x =
match x with
| [%type: int] -> assert false
| u -> u
According to Emacs, I'm using the most recent version available from Melpa, would something have changed since the last reason to explain this?