Debian Codegraph @

test-suite/bugs/bug_3008.v

raw
1 Module Type Intf1.
2 Parameter T : Type.
3 Inductive a := A.
4 End Intf1.
5
6 Module Impl1 <: Intf1.
7 Definition T := unit.
8 Inductive a := A.
9 End Impl1.
10
11 Module Type Intf2
12 (Impl1 : Intf1).
13 Parameter x : Impl1.A=Impl1.A -> Impl1.T.
14 End Intf2.
15
16 Module Type Intf3
17 (Impl1 : Intf1)
18 (Impl2 : Intf2(Impl1)).
19 End Intf3.
20
21 Fail Module Toto
22 (Impl1' : Intf1)
23 (Impl2 : Intf2(Impl1'))
24 (Impl3 : Intf3(Impl1)(Impl2)).
25 (* A UserError is expected here, not an uncaught Not_found *)
26
27 (* NB : the Inductive above and the A=A weren't in the initial test,
28 they are here only to force an access to the environment
29 (cf [Printer.qualid_of_global]) and check that this env is ok. *)