diff options
author | soubiran <soubiran@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-06-06 16:03:45 +0000 |
---|---|---|
committer | soubiran <soubiran@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-06-06 16:03:45 +0000 |
commit | 86b28df4c6029d43a0f12ab7c2d85cc13f4f60f1 (patch) | |
tree | 1b1a907b423b3b400eac8bd29718521525fb4f00 | |
parent | 35689ba23648cdae2b6aef5df0902af349bbf17a (diff) |
ajout d'un printer pour les contraintes d'univers + correction d'un bug sur les notations dans les alias de module.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11063 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r-- | dev/db | 1 | ||||
-rw-r--r-- | dev/top_printers.ml | 2 | ||||
-rw-r--r-- | kernel/univ.ml | 10 | ||||
-rw-r--r-- | kernel/univ.mli | 1 | ||||
-rw-r--r-- | library/declaremods.ml | 5 |
5 files changed, 16 insertions, 3 deletions
@@ -21,6 +21,7 @@ install_printer Top_printers.pprawconstr install_printer Top_printers.ppconstr install_printer Top_printers.ppuni install_printer Top_printers.ppuniverses +install_printer Top_printers.ppconstraints install_printer Top_printers.pptype install_printer Top_printers.ppj install_printer Top_printers.ppenv diff --git a/dev/top_printers.ml b/dev/top_printers.ml index a63c6c2dd..afae141b9 100644 --- a/dev/top_printers.ml +++ b/dev/top_printers.ml @@ -120,6 +120,8 @@ let ppuni u = pp(pr_uni u) let ppuniverses u = pp (str"[" ++ pr_universes u ++ str"]") +let ppconstraints c = pp (pr_constraints c) + let ppenv e = pp (str "[" ++ pr_named_context_of e ++ str "]" ++ spc() ++ str "[" ++ pr_rel_context e (rel_context e) ++ str "]") diff --git a/kernel/univ.ml b/kernel/univ.ml index 89b4a2112..001ee3ea8 100644 --- a/kernel/univ.ml +++ b/kernel/univ.ml @@ -579,7 +579,15 @@ let pr_universes g = let graph = UniverseMap.fold (fun k a l -> (k,a)::l) g [] in prlist (function (_,a) -> pr_arc a) graph - +let pr_constraints c = + Constraint.fold (fun (u1,op,u2) pp_std -> + let op_str = match op with + | Lt -> " < " + | Leq -> " <= " + | Eq -> " = " + in pp_std ++ pr_uni_level u1 ++ str op_str ++ + pr_uni_level u2 ++ fnl () ) c (str "") + (* Dumping constrains to a file *) let dump_universes output g = diff --git a/kernel/univ.mli b/kernel/univ.mli index e2594e217..1ce5329ab 100644 --- a/kernel/univ.mli +++ b/kernel/univ.mli @@ -80,6 +80,7 @@ val subst_large_constraints : val pr_uni : universe -> Pp.std_ppcmds val pr_universes : universes -> Pp.std_ppcmds +val pr_constraints : constraints -> Pp.std_ppcmds (*s Dumping to a file *) diff --git a/library/declaremods.ml b/library/declaremods.ml index 0b0483a85..0bb74f74a 100644 --- a/library/declaremods.ml +++ b/library/declaremods.ml @@ -355,8 +355,9 @@ let subst_module ((sp,kn),subst,(entry,substobjs,_)) = let subst_module_alias ((sp,kn),subst,(entry,substobjs,_)) = let dir,mp = dir_of_sp sp, mp_of_kn kn in let (sub,mbids,msid,objs) = substobjs in - let sub = update_subst_alias subst (map_msid msid mp) in - let subst' = join sub subst in + let sub' = update_subst_alias subst (map_msid msid mp) in + let subst' = join sub' subst in + let subst' = join sub subst' in (* substitutive_objects get the new substitution *) let substobjs = (subst',mbids,msid,objs) in (* if we are not a functor - calculate substitued. |