Debian Codegraph @

test-suite/bugs/bug_2603.v

raw
1 (** Namespace of module vs. namescope of definitions/constructors/...
2
3 As noticed by A. Appel in bug #2603, module names and definition
4 names used to be in the same namespace. But conflict with names
5 of constructors (or 2nd mutual inductive...) used to not be checked
6 enough, leading to strange situations.
7
8 - In 8.3pl3 we introduced checks that forbid uniformly the following
9 situations.
10
11 - For 8.4 we finally managed to make module names and other names
12 live in two separate namespace, hence allowing all of the following
13 situations.
14 *)
15
16 Module Type T.
17 End T.
18
19 Declare Module K : T.
20
21 Module Type L.
22 Declare Module E : T.
23 End L.
24
25 Module M1 : L with Module E:=K.
26 Module E := K.
27 Inductive t := E. (* Used to be accepted, but End M1 below was failing *)
28 End M1.
29
30 Module M2 : L with Module E:=K.
31 Inductive t := E.
32 Module E := K. (* Used to be accepted *)
33 End M2. (* Used to be accepted *)