-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #304 from FissoreD/abs_with_types
[parser] allow to type binders in lambda abstractions + tests
- Loading branch information
Showing
7 changed files
with
102 additions
and
30 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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
% Test for the correct parsing of binders with types | ||
|
||
pred test1. | ||
test1 :- | ||
X = (x : bool\ x), | ||
Y = X tt, | ||
print Y. | ||
|
||
pred test2. | ||
test2 :- | ||
_ = (x : bool\ x as Z), | ||
Y = Z tt, | ||
print Y. | ||
|
||
main :- | ||
test1, | ||
test2. |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
% Test for the correct parsing of binders with types | ||
% Similar to test lambda4 but with type_checking error | ||
% since the lambda term is applied to a term with | ||
% an unexpected type | ||
|
||
main :- | ||
X = (x : bool\ x), | ||
Y = X 1. % Here type error |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
% Test for the correct parsing of binders with types | ||
% Similar to test lambda5 but with type_checking error | ||
% using the as constructor | ||
|
||
main :- | ||
_ = (x : bool\ x as Y), | ||
_ = Y 1. % Here type error |
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