-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7393d27
commit 10b90d6
Showing
4 changed files
with
35 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
### Input | ||
// Bool = (T: Type) -> T -> T -> T | ||
let Type -> #0 -> #1 -> #2; | ||
// false (left) | ||
let Type => #0 => #1 => #1; | ||
// true (right) | ||
let Type => #0 => #1 => #0; | ||
// and : Bool -> Bool -> Bool | ||
// = v1:Bool => v2:Bool => T:Type => t1:T => t2:T => (v1 T t1 (v2 T t1 t2)) | ||
let #2 => #3 => Type => #0 => #1 => #4 #2 #1 (#3 #2 #1 #0); | ||
|
||
// and true true | ||
#0 #1 #1 | ||
|
||
### Eval | ||
Type => #0 => #1 => #0 | ||
|
||
### Type | ||
Type -> #0 -> #1 -> #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
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 |
---|---|---|
|
@@ -26,4 +26,7 @@ rule expr { | |
} | ||
} | ||
|
||
rule layout = [' ' | '\n']; | ||
rule layout { | ||
[' ' | '\n']; | ||
"//" [^'\n']* "\n"; | ||
} |
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,8 @@ | ||
Type | ||
// Nat : (T:Type) -> zero:T -> succ:(T->T) -> T | ||
let Type -> #0 -> (#1 -> #2) -> #2; | ||
// zero : Nat | ||
let Type => #0 => (#1 -> #2) => #1; | ||
// add1 : Nat -> Nat | ||
// = (v:Nat) => (T:Type) => zero:T => succ:(T->T) => succ (v T zero succ) | ||
let #1 => Type => #0 => (#1 -> #2) => #0 (#3 #2 #1 #0); | ||
#0 #1 |