-
Notifications
You must be signed in to change notification settings - Fork 9
/
section.t
107 lines (80 loc) · 1.71 KB
/
section.t
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
$ cat >err.ny <<EOF
> axiom A : Type
> section B :=
> axiom f : A -> Type
> end
> echo B.f
> echo f
> EOF
$ narya -v err.ny
→ info[I0001]
○ axiom A assumed
→ info[I0007]
○ section B opened
→ info[I0001]
○ axiom f assumed
→ info[I0008]
○ section B closed
B.f
: A → Type
→ error[E0300]
■ $TESTCASE_ROOT/err.ny
6 | echo f
^ unbound variable: f
[1]
$ narya -v -e 'end'
→ error[E2600]
○ no section here to end
[1]
$ cat >section.ny <<EOF
> axiom A:Type
> section one :=
> axiom B:Type
> section two :=
> axiom f : A -> B
> end
> axiom a:A
> def b : B := two.f a
> section three :=
> axiom C : B -> Type
> axiom c : C b
> end
> axiom g : (y:B) → three.C y
> end
> axiom gc : Id (one.three.C one.b) one.three.c (one.g one.b)
> import one.three
> axiom gc' : Id (C one.b) c (one.g one.b)
> EOF
$ narya -v section.ny
→ info[I0001]
○ axiom A assumed
→ info[I0007]
○ section one opened
→ info[I0001]
○ axiom B assumed
→ info[I0007]
○ section two opened
→ info[I0001]
○ axiom f assumed
→ info[I0008]
○ section two closed
→ info[I0001]
○ axiom a assumed
→ info[I0000]
○ constant b defined
→ info[I0007]
○ section three opened
→ info[I0001]
○ axiom C assumed
→ info[I0001]
○ axiom c assumed
→ info[I0008]
○ section three closed
→ info[I0001]
○ axiom g assumed
→ info[I0008]
○ section one closed
→ info[I0001]
○ axiom gc assumed
→ info[I0001]
○ axiom gc' assumed