Debian Codegraph @

test-suite/bugs/bug_4121.v

raw
1 (* -*- coq-prog-args: ("-nois") -*- *)
2 Unset Strict Universe Declaration.
3 (* File reduced by coq-bug-finder from original input, then from 830 lines to 47 lines, then from 25 lines to 11 lines *)
4 (* coqc version 8.5beta1 (March 2015) compiled on Mar 11 2015 18:51:36 with OCaml 4.01.0
5 coqtop version cagnode15:/afs/csail.mit.edu/u/j/jgross/coq-8.5,v8.5 (8dbfee5c5f897af8186cb1bdfb04fd4f88eca677) *)
6
7 Declare ML Module "rocq-runtime.plugins.ltac".
8
9 Set Default Proof Mode "Classic".
10
11 Set Universe Polymorphism.
12 Class Contr_internal (A : Type) := BuildContr { center : A }.
13 Arguments center A {_}.
14 Create HintDb typeclass_instances discriminated.
15 Class Contr (A : Type) : Type := Contr_is_trunc : Contr_internal A.
16 #[export] Hint Extern 0 => progress change Contr_internal with Contr in * : typeclass_instances.
17 Definition contr_paths_contr0 {A} `{Contr A} : Contr A := {| center := center A |}.
18 #[export] Instance contr_paths_contr1 {A} `{Contr A} : Contr A := {| center := center A |}.
19 Check @contr_paths_contr0@{i}.
20 Check @contr_paths_contr1@{i}. (* Error: Universe instance should have length 2 *)
21 (** It should have length 1, just like contr_paths_contr0 *)