~ubuntu-branches/ubuntu/wily/coq-doc/wily

« back to all changes in this revision

Viewing changes to test-suite/modules/subtyping.v

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu, Stéphane Glondu, Samuel Mimram
  • Date: 2010-01-07 22:50:39 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107225039-n3cq82589u0qt0s2
Tags: 8.2pl1-1
[ Stéphane Glondu ]
* New upstream release (Closes: #563669)
  - remove patches
* Packaging overhaul:
  - use git, advertise it in Vcs-* fields of debian/control
  - use debhelper 7 and dh with override
  - use source format 3.0 (quilt)
* debian/control:
  - set Maintainer to d-o-m, set Uploaders to Sam and myself
  - add Homepage field
  - bump Standards-Version to 3.8.3
* Register PDF documentation into doc-base
* Add debian/watch
* Update debian/copyright

[ Samuel Mimram ]
* Change coq-doc's description to mention that it provides documentation in
  pdf format, not postscript, closes: #543545.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(* Non regression for bug #1302 *)
 
2
 
 
3
(* With universe polymorphism for inductive types, subtyping of
 
4
   inductive types needs a special treatment: the standard conversion
 
5
   algorithm does not work as it only knows to deal with constraints of
 
6
   the form alpha = beta or max(alphas, alphas+1) <= beta, while
 
7
   subtyping of inductive types in Type generates constraints of the form
 
8
   max(alphas, alphas+1) <= max(betas, betas+1).
 
9
 
 
10
   These constraints are anyway valid by monotonicity of subtyping but we
 
11
   have to detect it early enough to avoid breaking the standard
 
12
   algorithm for constraints on algebraic universes. *)
 
13
 
 
14
Module Type T.
 
15
 
 
16
 Parameter A : Type (* Top.1 *) .
 
17
 
 
18
 Inductive L : Type (* max(Top.1,1) *) := 
 
19
 | L0
 
20
 | L1 :  (A -> Prop) -> L.
 
21
 
 
22
End T.
 
23
 
 
24
Axiom Tp : Type (* Top.5 *) .
 
25
 
 
26
Module TT : T. 
 
27
 
 
28
 Definition A : Type (* Top.6 *) := Tp. (* generates Top.5 <= Top.6 *)
 
29
 
 
30
 Inductive L : Type (* max(Top.6,1) *) := 
 
31
 | L0
 
32
 | L1 :  (A -> Prop) -> L.
 
33
 
 
34
End TT. (* Generates Top.6 <= Top.1 (+ auxiliary constraints for L_rect) *)
 
35
 
 
36
(* Note: Top.6 <= Top.1 is generated by subtyping on A; 
 
37
   subtyping of L follows and has not to be checked *)
 
38
 
 
39
 
 
40
 
 
41
(* The same bug as #1302 but for Definition *)
 
42
(* Check that inferred algebraic universes in interfaces are considered *)
 
43
 
 
44
Module Type U. Definition A := Type -> Type. End U.
 
45
Module M:U. Definition A := Type -> Type. End M.
 
46