forked from the-little-typer/pie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pie-info.rkt
35 lines (31 loc) · 854 Bytes
/
pie-info.rkt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#lang racket/base
(require (for-syntax racket/base syntax/parse))
(provide (all-defined-out))
(define-syntax (define-pie-keyword stx)
(syntax-parse stx
[(_ kw:id)
#'(define-syntax (kw inner-stx)
(syntax-parse inner-stx
#:literals (kw)
[kw #'(void)]
[(kw e (... ...)) #'(void e (... ...))]))]))
(define-syntax (define-pie-keywords stx)
(syntax-parse stx
[(_ kw:id ...)
#'(begin
(define-pie-keyword kw)
...)]))
(define-pie-keywords
U
Nat zero add1 which-Nat iter-Nat rec-Nat ind-Nat
-> → Π Pi ∏ λ lambda
quote Atom
car cdr cons Σ Sigma Pair
Trivial sole
List :: nil rec-List ind-List
Absurd ind-Absurd
= same replace trans cong symm ind-=
Vec vecnil vec:: head tail ind-Vec
Either left right ind-Either
TODO the
check-same claim define)