From 83f321c19cfd97e386d7bd5f0aca24ea46c43d2b Mon Sep 17 00:00:00 2001 From: Gaetan Gilbert Date: Fri, 31 Mar 2017 13:53:08 +0200 Subject: Instances should obey universe binders even when defined by tactics. --- test-suite/output/UnivBinders.out | 6 ++++++ test-suite/output/UnivBinders.v | 7 +++++++ test-suite/success/univnames.v | 13 ++++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 test-suite/output/UnivBinders.out create mode 100644 test-suite/output/UnivBinders.v (limited to 'test-suite') diff --git a/test-suite/output/UnivBinders.out b/test-suite/output/UnivBinders.out new file mode 100644 index 0000000000..128bc77673 --- /dev/null +++ b/test-suite/output/UnivBinders.out @@ -0,0 +1,6 @@ +bar@{u} = nat + : Wrap@{u} Set +(* u |= Set < u + *) + +bar is universe polymorphic diff --git a/test-suite/output/UnivBinders.v b/test-suite/output/UnivBinders.v new file mode 100644 index 0000000000..d9e89e43c6 --- /dev/null +++ b/test-suite/output/UnivBinders.v @@ -0,0 +1,7 @@ +Set Universe Polymorphism. +Set Printing Universes. + +Class Wrap A := wrap : A. + +Instance bar@{u} : Wrap@{u} Set. Proof nat. +Print bar. diff --git a/test-suite/success/univnames.v b/test-suite/success/univnames.v index 048b53d26c..fe3b8c1d7c 100644 --- a/test-suite/success/univnames.v +++ b/test-suite/success/univnames.v @@ -21,6 +21,17 @@ Inductive bla@{l k} : Type@{k} := blaI : Type@{l} -> bla. Inductive blacopy@{k l} : Type@{k} := blacopyI : Type@{l} -> blacopy. +Class Wrap A := wrap : A. + +Fail Instance bad@{} : Wrap Type := Type. + +Instance bad@{} : Wrap Type. +Fail Proof Type. +Abort. + +Instance bar@{u} : Wrap@{u} Set. Proof nat. + + Monomorphic Universe g. -Inductive blacopy'@{l} : Type@{g} := blacopy'I : Type@{l} -> blacopy'. \ No newline at end of file +Inductive blacopy'@{l} : Type@{g} := blacopy'I : Type@{l} -> blacopy'. -- cgit v1.2.3