Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCaml keywords as extension names confuses indentation #225

Open
jtoman opened this issue Dec 27, 2019 · 2 comments
Open

OCaml keywords as extension names confuses indentation #225

jtoman opened this issue Dec 27, 2019 · 2 comments

Comments

@jtoman
Copy link

jtoman commented Dec 27, 2019

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] -> ...
@Chris00
Copy link
Member

Chris00 commented Dec 30, 2019

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.

@jtoman
Copy link
Author

jtoman commented Jan 7, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants