Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Commit 5eead6d

Browse files
committed
Tweak printing of iline records.
Following from #30
1 parent 8272931 commit 5eead6d

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

examples/example-project/src/ZZ.res

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,21 @@ module J = {
1919
}
2020

2121
let z = <J> {React.string("")} {React.string("")} </J>
22+
23+
type inline =
24+
| A({x: int, y: string})
25+
| B({x: int, y: string})
26+
| C({
27+
x: int,
28+
y: string,
29+
z: string,
30+
w: string,
31+
x0: string,
32+
q1: string,
33+
q2: string,
34+
q3: string,
35+
q4: string,
36+
})
37+
| D({x: int, y: string})
38+
| E({x: int, y: string})
39+
| F

src/rescript-editor-support/PrintType.re

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ let print_constructor = (loop, {Types.cd_id, cd_args, cd_res}) => {
212212
| Cstr_tuple([]) => Pretty.empty
213213
| Cstr_record(labels) =>
214214
str("({")
215-
+++ indentGroup(break +++ commadList(print_attr, labels) +++ dedent)
215+
+++ indentGroup(
216+
indentGroup(break +++ commadList(print_attr, labels) +++ dedent),
217+
)
216218
+++ str("})")
217219
| Cstr_tuple(args) => tupleList(args, loop)
218220
}

0 commit comments

Comments
 (0)