-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement wildcard constructor (#2550)
- Closes #2549 The implementation of wildcard constructors was previously done in the arity checker. I did not realise I was missing it because there was not tests for it that included typechecking (we were only checking formatting).
- Loading branch information
1 parent
69594ed
commit 4fa1735
Showing
3 changed files
with
34 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module ConstructorWildcard; | ||
|
||
type Bool := | ||
false | true; | ||
|
||
type either (A B : Type) := | ||
left A | ||
| right B; | ||
|
||
isLeft {A B} : either A B → Bool | ||
| left@{} := true | ||
| right@{} := false; | ||
|
||
not : Bool → Bool | ||
| false@{} := true | ||
| true := false; |