From f6007680bfa822ecc3d2f101fb6e21e2b1464b1b Mon Sep 17 00:00:00 2001 From: msozeau Date: Tue, 1 Jul 2008 17:03:43 +0000 Subject: Various bug fixes in type classes and subtac: - Cases on multiple objects - Avoid dangerous coercion with evars in subtac_coercion - Resolve typeclasses method-by-method to get better error messages. - Correct merging of instance databases (and add debug printer) - Fix a script in NOrder where a setoid_replace was not working before. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11198 85f007b7-540e-0410-9357-904b9bb8a0f7 --- parsing/printer.ml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'parsing/printer.ml') diff --git a/parsing/printer.ml b/parsing/printer.ml index 8ef206649e..6119f5d1e7 100644 --- a/parsing/printer.ml +++ b/parsing/printer.ml @@ -527,3 +527,14 @@ let pr_assumptionset env s = in (Option.default (mt ()) vars) ++ (Option.default (mt ()) axioms) +let cmap_to_list m = Cmap.fold (fun k v acc -> v :: acc) m [] + +open Typeclasses + +let pr_instance i = + pr_global (ConstRef (instance_impl i)) + +let pr_instance_gmap insts = + prlist_with_sep fnl (fun (gr, insts) -> + prlist_with_sep fnl pr_instance (cmap_to_list insts)) + (Gmap.to_list insts) -- cgit v1.2.3