aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/univ.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <matthieu.sozeau@inria.fr>2015-11-27 20:34:51 +0100
committerGravatar Matthieu Sozeau <matthieu.sozeau@inria.fr>2015-11-27 21:01:59 +0100
commit4a11dc25938f3f009e23f1e7c5fe01b2558928c3 (patch)
treeb9e68a7ff2082b25dd4ebc113d43ec9d0f691aa5 /kernel/univ.ml
parenta0e72610a71e086da392c8563c2eec2e35211afa (diff)
Univs: entirely disallow instantiation of polymorphic constants with
Prop levels. As they are typed assuming all variables are >= Set now, and this was breaking an invariant in typing. Only one instance in the standard library was used in Hurkens, which can be avoided easily. This also avoids displaying unnecessary >= Set constraints everywhere.
Diffstat (limited to 'kernel/univ.ml')
-rw-r--r--kernel/univ.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/univ.ml b/kernel/univ.ml
index dc0a4b43c..2b3a2bdb1 100644
--- a/kernel/univ.ml
+++ b/kernel/univ.ml
@@ -1707,7 +1707,9 @@ struct
else if Array.length y = 0 then x
else Array.append x y
- let of_array a = a
+ let of_array a =
+ assert(Array.for_all (fun x -> not (Level.is_prop x)) a);
+ a
let to_array a = a
@@ -1715,7 +1717,7 @@ struct
let subst_fn fn t =
let t' = CArray.smartmap fn t in
- if t' == t then t else t'
+ if t' == t then t else of_array t'
let levels x = LSet.of_array x