OCaml Forge
SCM

Detail: [#1163] Incorrect indentation of 'let...and...in' [trunk@r381]

Bugs: Browse | Download .csv | Monitor

[#1163] Incorrect indentation of 'let...and...in' [trunk@r381]

Date:
2012-05-21 21:23
Priority:
3
State:
Closed
Submitted by:
Marc Simpson (marc)
Assigned to:
Nobody (None)
Hardware:
None
Resolution:
None
Severity:
None
Version:
None
Component:
None
Operating System:
None
Product:
None
 
URL:
Summary:
Incorrect indentation of 'let...and...in' [trunk@r381]

Detailed description
Please find attached a simple demonstration of the problem: when a multiline 'let...and...in' is not preceded by a line break, 'and' is (incorrectly) outdented (as seen in 'bar').

In the case of 'baz' (two 'let's), indentation behaves as expected.




Followup

Message
Date: 2014-01-02 12:13
Sender: Christophe Troestler

Works well with the current version (commit 63d89f7).
Date: 2012-05-24 01:53
Sender: Stefan Monnier

No, not a known issue (just a reflection of my complete lack of knowledge about the OO part of OCaml). Please make a new bug report for it (or send me an email at monnier@iro.umontreal.ca, since I find it a lot more convenient than clunky web-interfaces).
Date: 2012-05-23 07:41
Sender: Marc Simpson

Thanks for the tip Stefan.

Unfortunately, SMIE-based indentation seems to perform rather poorly on OOP expressions—method names and their bodies are overly indented. Known issue?
Date: 2012-05-22 03:16
Sender: Stefan Monnier

FWIW, this problem does not appear if you use the new SMIE-based indentation code (by setting tuareg-use-smie to t).

Attached Files:

Attachments:
let-and-indentation.ml

Changes:

Field Old Value Date By
status_idOpen2014-01-02 12:13chris
close_dateNone2014-01-02 12:13chris
File Added179: let-and-indentation.ml2012-05-21 21:23marc