OCaml Forge
SCM

Detail: [#792] V.2.0.1: Wrong indentation for opening branch of function without pipe

Bugs: Browse | Download .csv | Monitor

[#792] V.2.0.1: Wrong indentation for opening branch of function without pipe

Date:
2010-10-29 23:02
Priority:
3
State:
Open
Submitted by:
Alessandro Baretta (alexbaretta)
Assigned to:
Nobody (None)
Hardware:
All
Resolution:
None
Severity:
minor
Version:
v1.1
Component:
None
Operating System:
None
Product:
None
 
URL:
Summary:
V.2.0.1: Wrong indentation for opening branch of function without pipe

Detailed description
When using the function construct to introduce pattern matching, the optional initial pipe character is needed to get the appropriate indentation. This only happens with the function construct, not with match ... with or type definitions. Further, version 1.45.6 exhibited the correct behavior.

Here's an example:

type t =
X (* Correct *)
| Y

type s =
| X'
| Y'


let f = function
X -> 0 (* Wrong *)
| Y -> 1

let g = function
| X -> 2
| Y -> 3

let f' x = match x with
X -> 4 (* Correct *)
| Y -> 5

let g' x = match x with
| X -> 6
| Y -> 7

Followup

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item