diff options
author | soubiran <soubiran@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2009-10-23 16:19:47 +0000 |
---|---|---|
committer | soubiran <soubiran@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2009-10-23 16:19:47 +0000 |
commit | 82649c076ae38353aec5333987c80476f27e3775 (patch) | |
tree | b5490819cb0bfd8ecc01e89b18344956d1ef9d6e /library/libnames.ml | |
parent | 76ff040e3b46539625ec61e7597f06a87b927c5a (diff) |
First debug... the renaming of librairies was not working and auto/dn were not taking in account equivalent names of inductive types.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12408 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'library/libnames.ml')
-rw-r--r-- | library/libnames.ml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/library/libnames.ml b/library/libnames.ml index fad0336fc..9a7135eae 100644 --- a/library/libnames.ml +++ b/library/libnames.ml @@ -57,6 +57,15 @@ let subst_global subst ref = match ref with let c',t = subst_constructor subst c in if c'==c then ref,t else ConstructRef c', t +let canonical_gr = function + | ConstRef con -> + ConstRef(constant_of_kn(canonical_con con)) + | IndRef (kn,i) -> + IndRef(mind_of_kn(canonical_mind kn),i) + | ConstructRef ((kn,i),j )-> + ConstructRef((mind_of_kn(canonical_mind kn),i),j) + | VarRef id -> VarRef id + let global_of_constr c = match kind_of_term c with | Const sp -> ConstRef sp | Ind ind_sp -> IndRef ind_sp |