Debian Codegraph @

test-suite/bugs/HoTT_coq_084.v

raw
1 Set Implicit Arguments.
2 Set Universe Polymorphism.
3
4 Module success.
5 Unset Primitive Projections.
6
7 Record group :=
8 { carrier : Type;
9 id : carrier }.
10
11 Notation "1" := (id _) : g_scope.
12
13 Delimit Scope g_scope with g.
14 Bind Scope g_scope with carrier.
15
16 Section foo.
17 Variable g : group.
18 Variable comp : carrier g -> carrier g -> carrier g.
19
20 Check comp 1 1.
21 End foo.
22 End success.
23
24 Module failure.
25 Set Primitive Projections.
26
27 Record group :=
28 { carrier : Type;
29 id : carrier }.
30
31 Notation "1" := (id _) : g_scope.
32
33 Delimit Scope g_scope with g.
34 Bind Scope g_scope with carrier.
35
36 Section foo.
37 Variable g : group.
38 Variable comp : carrier g -> carrier g -> carrier g.
39
40 Check comp 1 1.
41 (* Toplevel input, characters 11-12:
42 Error:
43 In environment
44 g : group
45 comp : carrier g -> carrier g -> carrier g
46 The term "1" has type "nat" while it is expected to have type "carrier g".
47 *)
48 End foo.
49 End failure.