Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The parser tests had a number of cases where they had Natural and Integer syntax swapped round. This presumably dates from before #138 switched the grammar of Integer and Natural. Note that this difference doesn't actually matter for these parsing tests, because an expression like `+1 : Natural` still parses correctly, it just fails to typecheck. But I found it confusing to have the syntax so consistently backwards in the tests, so I thought it was worth changing.
- Loading branch information
1 parent
c409b11
commit 471037f
Showing
27 changed files
with
98 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ foo = ([] : List Integer) # [1, 2, 3] # ([1, 2, 3] : List Integer) | ||
, bar = [] : Optional Integer | ||
, baz = [1] : Optional Integer | ||
} : { foo : List Integer, bar : Optional Integer, baz : Optional Integer } | ||
{ foo = ([] : List Natural) # [1, 2, 3] # ([1, 2, 3] : List Natural) | ||
, bar = [] : Optional Natural | ||
, baz = [1] : Optional Natural | ||
} : { foo : List Natural, bar : Optional Natural, baz : Optional Natural } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
24, | ||
null, | ||
1, | ||
null, | ||
1, | ||
null, | ||
"example.com", | ||
"foo", | ||
null, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +0,0 @@ | ||
[ | ||
4, | ||
null, | ||
1.1, | ||
-1.1, | ||
10, | ||
11, | ||
-1.1 | ||
] | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
"ABC${Integer/show 123}" | ||
"ABC${Natural/show 123}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"ABC", | ||
[ | ||
0, | ||
"Integer/show", | ||
"Natural/show", | ||
[ | ||
15, | ||
123 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
'' | ||
ABC | ||
${Integer/show 123} | ||
${Natural/show 123} | ||
'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"ABC\n", | ||
[ | ||
0, | ||
"Integer/show", | ||
"Natural/show", | ||
[ | ||
15, | ||
123 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
let x = 1 | ||
in let y : Integer = 2 | ||
in let y : Natural = 2 | ||
in x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
[ | ||
25, | ||
"y", | ||
"Integer", | ||
"Natural", | ||
[ | ||
15, | ||
2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[ [1, 2, 3] | ||
, [1, 2, 3] : List Integer | ||
[ [+1, +2, +3] | ||
, [+1, +2, +3] : List Integer | ||
, [] : List Integer | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[ +0, +1, +01, +10 ] | ||
[ 0, 1, 01, 10 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,19 +2,19 @@ | |
4, | ||
null, | ||
[ | ||
16, | ||
15, | ||
0 | ||
], | ||
[ | ||
16, | ||
15, | ||
1 | ||
], | ||
[ | ||
16, | ||
15, | ||
1 | ||
], | ||
[ | ||
16, | ||
15, | ||
10 | ||
] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
{ foo = (False && Natural/even (+1 + +2 * +3)) || True == False != True } | ||
{ foo = (False && Natural/even (1 + 2 * 3)) || True == False != True } | ||
∧ { bar = [ "ABC" ++ "DEF" ] # [ "GHI" ] } ⫽ { baz = True } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,18 +18,18 @@ | |
3, | ||
4, | ||
[ | ||
16, | ||
15, | ||
1 | ||
], | ||
[ | ||
3, | ||
5, | ||
[ | ||
16, | ||
15, | ||
2 | ||
], | ||
[ | ||
16, | ||
15, | ||
3 | ||
] | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,8 @@ | |
24, | ||
null, | ||
0, | ||
null, | ||
1, | ||
null, | ||
"example.com", | ||
"foo", | ||
"bar?baz", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ foo = 1 | ||
, bar = +2 | ||
{ foo = +1 | ||
, bar = 2 | ||
, baz = True | ||
} : { foo : Integer, bar : Natural, baz : Bool } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
let TypeSynonym = Integer in 1 : TypeSynonym | ||
let TypeSynonym = Integer in +1 : TypeSynonym |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
[ | ||
26, | ||
[ | ||
15, | ||
16, | ||
1 | ||
], | ||
"TypeSynonym" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.