Skip to content

Commit 3340be1

Browse files
committed
[Stacked Diff 3/n #2614] [Parse Hashtags for polymorphic variants]""
This reverts commit f005630051aa47c2e2a51634229e8f26d7b56ab6.
1 parent 9c9842a commit 3340be1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1934
-361
lines changed

esy.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@
8484
},
8585
"scripts": {
8686
"test": "esy x make test-once-installed",
87-
"doc": "esy dune build @doc"
87+
"doc": "esy build dune build @doc"
8888
}
8989
}

formatTest/typeCheckedTests/expected_output/arityConversion.re

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[@reason.version 3.7];
2+
23
Some((1, 2, 3));
34

45
type bcd =

formatTest/typeCheckedTests/expected_output/attributes.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* This has a nice side effect when printing the terms:
88
* If a node has attributes attached to it,
99
*/;
10-
[@reason.version 3.7];
1110

1211
/**Floating comment text should be removed*/;
12+
[@reason.version 3.7];
1313

1414
/**
1515
* Core language features:
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* Even if you have an explicit v3.6 marker.
3+
* This whole file wil be auto-upaded to 3.8 becase something uses
4+
* angle brackets.
5+
*/;
6+
[@reason.version 3.8];
7+
let watchThisIsOldStyle: list<int> = [1, 2];
8+
9+
let watchThisIsOldStylePoly = #hello;
10+
11+
/**
12+
* This will cause the whole file to be promoted.
13+
*/
14+
let x: list<int> = [1, 3];
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[@reason.version 3.8];
2+
/**
3+
* Test auto-promotion based on feature inference even if no version
4+
* tag. By default you're using the old 3.7.
5+
*/
6+
let watchThisIsOldStyle: list<int> = [1, 2];
7+
8+
let watchThisIsOldStylePoly = #hello;
9+
10+
/**
11+
* This will cause the whole file to be promoted.
12+
*/
13+
let x: list<int> = [1, 3];
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[@reason.version 3.7];
2+
/**
3+
* This should just print a 3.7 version attr at the top.
4+
*/
5+
let watchThisIsOldStyle: list(int) = [1, 2];

formatTest/typeCheckedTests/expected_output/comments.re

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* **** comment */
22
/*** comment */
33
/** docstring */;
4+
45
[@reason.version 3.7];
56

67
/* comment */

formatTest/typeCheckedTests/expected_output/comments.rei

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
/* **** comment */
22
/*** comment */
3-
/*** docstring */
3+
/** docstring */;
4+
5+
[@reason.version 3.7];
6+
47
/* comment */
5-
/*** docstring */
8+
/** docstring */;
69
/*** comment */
710
/**** comment */
811
/***** comment */
912

1013
/** */;
11-
[@reason.version 3.7];
12-
1314
/*** */
1415
/**** */
1516

formatTest/typeCheckedTests/expected_output/comments.rei.4.07.0

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* **** comment */
22
/*** comment */
33
/** docstring */;
4+
45
[@reason.version 3.7];
56

67
/* comment */

formatTest/typeCheckedTests/expected_output/comments.rei.4.07.1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* **** comment */
22
/*** comment */
33
/** docstring */;
4+
45
[@reason.version 3.7];
56

67
/* comment */

0 commit comments

Comments
 (0)