blob: 720083aec5d4f0d20c38a13d723b5665d6d7c8c5 (
plain)
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
|
Module M.
Definition a := 0.
Definition b := 1.
Module N.
Notation c := (a + b).
End N.
Inductive even : nat -> Prop :=
| even_0 : even 0
| even_S n : odd n -> even (S n)
with odd : nat -> Set :=
odd_S n : even n -> odd (S n).
End M.
Module Simple.
Import M(a).
Check a.
Fail Check b.
Fail Check N.c.
(* todo output test: this prints a+M.b since the notation isn't imported *)
Check M.N.c.
Fail Import M(c).
Fail Import M(M.b).
Import M(N.c).
Check N.c.
(* interestingly prints N.c (also does with unfiltered Import M) *)
Import M(even(..)).
Check even. Check even_0. Check even_S.
Check even_sind. Check even_ind.
Fail Check even_rect. (* doesn't exist *)
Fail Check odd. Check M.odd.
Fail Check odd_S. Fail Check odd_sind.
End Simple.
Module WithExport.
Module X.
Export M(a, N.c).
End X.
Import X.
Check a.
Check N.c. (* also prints N.c *)
Fail Check b.
End WithExport.
|