Skip to content

Commit ed2bbfe

Browse files
cristianoczth
authored andcommitted
try something
1 parent c355552 commit ed2bbfe

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

Diff for: analysis/src/PrintType.ml

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
let printExpr ?(lineWidth = 60) typ =
22
Printtyp.reset_names ();
3+
Printtyp.reset_and_mark_loops typ;
34
try
45
Res_doc.toString ~width:lineWidth
56
(Res_outcome_printer.printOutTypeDoc (Printtyp.tree_of_typexp false typ (* HERE *)))

Diff for: analysis/tests/src/expected/CompletionPattern.res.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Path f
129129
"label": "optThird",
130130
"kind": 5,
131131
"tags": [],
132-
"detail": "optThird: option<[#second(someRecord) | #first]>\n\nsomeRecord",
132+
"detail": "optThird: option<[#first | #second(someRecord)]>\n\nsomeRecord",
133133
"documentation": null
134134
}, {
135135
"label": "nest",
@@ -150,7 +150,7 @@ Path f
150150
"label": "optThird",
151151
"kind": 5,
152152
"tags": [],
153-
"detail": "optThird: option<[#second(someRecord) | #first]>\n\nsomeRecord",
153+
"detail": "optThird: option<[#first | #second(someRecord)]>\n\nsomeRecord",
154154
"documentation": null
155155
}, {
156156
"label": "nest",
@@ -189,7 +189,7 @@ Path z
189189
"label": "optThird",
190190
"kind": 5,
191191
"tags": [],
192-
"detail": "optThird: option<[#second(someRecord) | #first]>\n\nsomeRecord",
192+
"detail": "optThird: option<[#first | #second(someRecord)]>\n\nsomeRecord",
193193
"documentation": null
194194
}]
195195

@@ -267,7 +267,7 @@ Path f
267267
"label": "optThird",
268268
"kind": 5,
269269
"tags": [],
270-
"detail": "optThird: option<[#second(someRecord) | #first]>\n\nsomeRecord",
270+
"detail": "optThird: option<[#first | #second(someRecord)]>\n\nsomeRecord",
271271
"documentation": null
272272
}, {
273273
"label": "nest",
@@ -360,7 +360,7 @@ Path z
360360
"label": "optThird",
361361
"kind": 5,
362362
"tags": [],
363-
"detail": "optThird: option<[#second(someRecord) | #first]>\n\nsomeRecord",
363+
"detail": "optThird: option<[#first | #second(someRecord)]>\n\nsomeRecord",
364364
"documentation": null
365365
}, {
366366
"label": "nest",
@@ -451,7 +451,7 @@ Path b
451451
"label": "optThird",
452452
"kind": 5,
453453
"tags": [],
454-
"detail": "optThird: option<[#second(someRecord) | #first]>\n\nsomeRecord",
454+
"detail": "optThird: option<[#first | #second(someRecord)]>\n\nsomeRecord",
455455
"documentation": null
456456
}, {
457457
"label": "nest",

Diff for: analysis/tests/src/expected/Hover.res.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ Hover src/Hover.res 106:21
7777
{"contents": {"kind": "markdown", "value": "```rescript\nint\n```"}}
7878

7979
Hover src/Hover.res 116:16
80-
{"contents": {"kind": "markdown", "value": "```rescript\nAA.cond<[< #str(string)]> => AA.cond<[< #str(string)]>\n```\n\n---\n\n```\n \n```\n```rescript\ntype AA.cond<'a> = 'a\n constraint 'a = [< #str(string)]\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C110%2C2%5D)\n"}}
80+
{"contents": {"kind": "markdown", "value": "```rescript\nAA.cond<([< #str(string)] as 'a)> => AA.cond<'a>\n```\n\n---\n\n```\n \n```\n```rescript\ntype AA.cond<'a> = 'a\n constraint 'a = [< #str(string)]\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C110%2C2%5D)\n"}}
8181

8282
Hover src/Hover.res 119:25
83-
{"contents": {"kind": "markdown", "value": "```rescript\nAA.cond<[< #str(string)]> => AA.cond<[< #str(string)]>\n```\n\n---\n\n```\n \n```\n```rescript\ntype AA.cond<'a> = 'a\n constraint 'a = [< #str(string)]\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C110%2C2%5D)\n"}}
83+
{"contents": {"kind": "markdown", "value": "```rescript\nAA.cond<([< #str(string)] as 'a)> => AA.cond<'a>\n```\n\n---\n\n```\n \n```\n```rescript\ntype AA.cond<'a> = 'a\n constraint 'a = [< #str(string)]\n```\nGo to: [Type definition](command:rescript-vscode.go_to_location?%5B%22Hover.res%22%2C110%2C2%5D)\n"}}
8484

8585
Hover src/Hover.res 122:3
8686
Nothing at that position. Now trying to use completion.

Diff for: analysis/tests/src/expected/PolyRec.res.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Hover src/PolyRec.res 12:10
2-
{"contents": {"kind": "markdown", "value": "```rescript\nError: could not print type\n```"}}
2+
{"contents": {"kind": "markdown", "value": "```rescript\n([#Leaf | #Node(int, 'a, 'a)] as 'a)\n```"}}
33

0 commit comments

Comments
 (0)