Skip to content

Commit 5541581

Browse files
committed
fixing universe polymorphism for 8.5pl1
1 parent 3705939 commit 5541581

File tree

6 files changed

+15
-14
lines changed

6 files changed

+15
-14
lines changed

theories/Core/Type.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Existing Class proper.
2424

2525
Section type.
2626
Polymorphic Context {T : Type}.
27-
Variable tT : type T.
27+
Polymorphic Variable tT : type T.
2828
(*
2929
Global Instance Proper_type : Proper T :=
3030
{ proper := fun x => equal x x }.

theories/Data/HList.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Require Import ExtLib.Tactics.
1212
Set Implicit Arguments.
1313
Set Strict Implicit.
1414
Set Asymmetric Patterns.
15+
Set Universe Polymorphism.
1516

1617
(** Core Type and Functions **)
1718
Section hlist.

theories/Data/List.v

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ Require Import ExtLib.Structures.Monad.
134134
Require Import ExtLib.Structures.Applicative.
135135

136136
Section traversable.
137-
Context {F : Type -> Type}.
138-
Context {Applicative_F : Applicative F}.
139-
Context {A B : Type}.
140-
Variable f : A -> F B.
137+
Polymorphic Context {F : Type -> Type}.
138+
Polymorphic Context {Applicative_F : Applicative F}.
139+
Polymorphic Context {A B : Type}.
140+
Polymorphic Variable f : A -> F B.
141141

142142
Polymorphic Fixpoint mapT_list (ls : list A) : F (list B) :=
143143
match ls with

theories/Data/POption.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Set Printing Universes.
55

66
Section poption.
77
Polymorphic Universe i.
8-
Variable T : Type@{i}.
8+
Polymorphic Variable T : Type@{i}.
99

1010
Polymorphic Inductive poption : Type@{i} :=
1111
| pSome : T -> poption
@@ -18,8 +18,8 @@ Arguments pNone {_}.
1818

1919
Section poption_map.
2020
Polymorphic Universes i j.
21-
Context {T : Type@{i}} {U : Type@{j}}.
22-
Variable f : T -> U.
21+
Polymorphic Context {T : Type@{i}} {U : Type@{j}}.
22+
Polymorphic Variable f : T -> U.
2323

2424
Polymorphic Definition fmap_poption (x : poption@{i} T) : poption@{j} U :=
2525
match x with

theories/Data/PreFun.v

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Section type.
1818

1919
Polymorphic Variables (tOk : typeOk tT) (uOk : typeOk tU).
2020

21-
Global Instance typeOk_Fun : typeOk type_Fun.
21+
Global Polymorphic Instance typeOk_Fun : typeOk type_Fun.
2222
Proof.
2323
constructor.
2424
{ unfold equiv. simpl. unfold respectful.
@@ -41,27 +41,27 @@ Section type.
4141
apply tOk. }
4242
Qed.
4343

44-
Global Instance proper_app : forall (f : T -> U) (a : T),
44+
Global Polymorphic Instance proper_app : forall (f : T -> U) (a : T),
4545
proper f -> proper a -> proper (f a).
4646
Proof.
4747
simpl; intros. red in H.
4848
eapply proper_left; eauto.
4949
eapply H. eapply preflexive. eapply equiv_prefl; auto. auto.
5050
Qed.
5151

52-
Theorem proper_fun : forall (f : T -> U),
52+
Polymorphic Theorem proper_fun : forall (f : T -> U),
5353
(forall x y, equal x y -> equal (f x) (f y)) ->
5454
proper f.
5555
Proof.
5656
intros. do 3 red. eauto.
5757
Qed.
5858

59-
Theorem equal_fun : forall (f g : T -> U),
59+
Polymorphic Theorem equal_fun : forall (f g : T -> U),
6060
(forall x y, equal x y -> equal (f x) (g y)) ->
6161
equal f g.
6262
Proof. intros. do 3 red. apply H. Qed.
6363

64-
Theorem equal_app : forall (f g : T -> U) (x y : T),
64+
Polymorphic Theorem equal_app : forall (f g : T -> U) (x y : T),
6565
equal f g -> equal x y ->
6666
equal (f x) (g y).
6767
Proof.

theories/Structures/Monoid.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Section Monoid.
1212
; monoid_unit : S
1313
}.
1414

15-
Context {Type_S : type S}.
15+
Polymorphic Context {Type_S : type S}.
1616

1717
Polymorphic Class MonoidLaws (M : Monoid) : Type :=
1818
{ monoid_assoc :> Associative M.(monoid_plus) equal

0 commit comments

Comments
 (0)