diff options
author | msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2009-05-16 13:53:49 +0000 |
---|---|---|
committer | msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2009-05-16 13:53:49 +0000 |
commit | df73f477fd496168bf448d2bfef8cec3cb0643ee (patch) | |
tree | 571510f4e0518bd01ca3611c84acee01fb1dfae3 /pretyping/recordops.ml | |
parent | b0e371b354ffdbf4a8572924602d04848020079e (diff) |
(Tentative to) add Canonical Structure resolution to the regular
unification algorithm. Uses the same code to recognize projections
(check_conv_record) and the same unification steps on the solution as
evar_conv. This required to fold the sigma through unify_* along with
the meta and evar substitutions as this can grow during unification.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12128 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping/recordops.ml')
-rw-r--r-- | pretyping/recordops.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pretyping/recordops.ml b/pretyping/recordops.ml index 16d3331aa..79c347cea 100644 --- a/pretyping/recordops.ml +++ b/pretyping/recordops.ml @@ -310,11 +310,13 @@ let outCanonicalStructure x = fst (outCanonStruct x) let lookup_canonical_conversion (proj,pat) = List.assoc pat (Refmap.find proj !object_table) +let isEvar_or_Meta c = isEvar c || isMeta c + let is_open_canonical_projection sigma (c,args) = try let l = Refmap.find (global_of_constr c) !object_table in let n = (snd (List.hd l)).o_NPARAMS in - try isEvar (whd_evar sigma (List.nth args n)) with Failure _ -> false + try isEvar_or_Meta (whd_evar sigma (List.nth args n)) with Failure _ -> false with Not_found -> false let freeze () = |