From 84544396cbbf34848be2240acf181b4d5f1f42d2 Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Sat, 27 Sep 2014 16:08:02 +0200 Subject: Add a boolean to indicate the unfolding state of a primitive projection, so as to reproduce correctly the reduction behavior of existing projections, i.e. delta + iota. Make [projection] an abstract datatype in Names.ml, most of the patch is about using that abstraction. Fix unification.ml which tried canonical projections too early in presence of primitive projections. --- kernel/vconv.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'kernel/vconv.ml') diff --git a/kernel/vconv.ml b/kernel/vconv.ml index 976380ede..3f9345ff8 100644 --- a/kernel/vconv.ml +++ b/kernel/vconv.ml @@ -203,7 +203,9 @@ let rec conv_eq env pb t1 t2 cu = else raise NotConvertible | Const c1, Const c2 -> eq_puniverses eq_constant c1 c2 cu | Proj (p1,c1), Proj (p2,c2) -> - if eq_constant p1 p2 then conv_eq env pb c1 c2 cu else raise NotConvertible + if eq_constant (Projection.constant p1) (Projection.constant p2) then + conv_eq env pb c1 c2 cu + else raise NotConvertible | Ind c1, Ind c2 -> eq_puniverses eq_ind c1 c2 cu | Construct c1, Construct c2 -> -- cgit v1.2.3