From e43710b391c278ac7fcb808ec28d720b4317660c Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Mon, 4 Jun 2018 15:26:20 +0200 Subject: Remove the proj_body field from the kernel. This was completely wrong, such a term could not even be type-checked by the kernel as it was internally using a match construct over a negative record. They were luckily only used in upper layers, namley printing and extraction. Recomputing the projection body might be costly in detyping, but this only happens when the compatibility flag is turned on, which is not the default. Such flag is probably bound to disappear anyways. Extraction should be fixed though so as to define directly primitive projections, similarly to what has been done in native compute. --- pretyping/inductiveops.ml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pretyping/inductiveops.ml') diff --git a/pretyping/inductiveops.ml b/pretyping/inductiveops.ml index 4ad32fc66..1a790be64 100644 --- a/pretyping/inductiveops.ml +++ b/pretyping/inductiveops.ml @@ -549,6 +549,9 @@ let compute_projections env (kn, _ as ind) = in Array.rev_of_list pbs +let legacy_match_projection env ind = + Array.map pi3 (compute_projections env ind) + let compute_projections ind mib = let ans = compute_projections ind mib in Array.map (fun (prj, ty, _) -> (prj, ty)) ans -- cgit v1.2.3