Skip to content

Commit

Permalink
Adapt to coq/coq#8488 (warning on automatic template polymorphism)
Browse files Browse the repository at this point in the history
Probably not all of these are required to be template but let's not
break compatibility for this.
  • Loading branch information
SkySkimmer committed Dec 13, 2018
1 parent d7164e7 commit 0351c73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions theories/AAC.v
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ Module Sym.
(** a symbol package contains an arity,
a value of the corresponding type,
and a proof that the value is a proper morphism *)
#[universes(template)]
Record pack : Type := mkPack {
ar : nat;
value :> type_of ar;
Expand All @@ -172,6 +173,7 @@ Module Bin.
Section t.
Context {X} {R: relation X}.

#[universes(template)]
Record pack := mk_pack {
value:> X -> X -> X;
compat: Proper (R ==> R ==> R) value;
Expand Down Expand Up @@ -204,6 +206,7 @@ Section s.
uf_desc: Unit R (Bin.value (e_bin uf_idx)) u
}.

#[universes(template)]
Record unit_pack := mk_unit_pack {
u_value:> X;
u_desc: list (unit_of u_value)
Expand All @@ -225,6 +228,7 @@ Section s.
contains, among other things, the arity of symbols)
*)

#[universes(template)]
Inductive T: Type :=
| sum: idx -> mset T -> T
| prd: idx -> nelist T -> T
Expand Down Expand Up @@ -325,12 +329,14 @@ Section s.

(** ** Normalisation *)

#[universes(template)]
Inductive discr {A} : Type :=
| Is_op : A -> discr
| Is_unit : idx -> discr
| Is_nothing : discr .

(* This is called sum in the std lib *)
#[universes(template)]
Inductive m {A} {B} :=
| left : A -> m
| right : B -> m.
Expand Down
1 change: 1 addition & 0 deletions theories/Utils.v
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ End dep.

(** * Utilities about (non-empty) lists and multisets *)

#[universes(template)]
Inductive nelist (A : Type) : Type :=
| nil : A -> nelist A
| cons : A -> nelist A -> nelist A.
Expand Down

0 comments on commit 0351c73

Please sign in to comment.