diff options
Diffstat (limited to 'parsing')
| -rw-r--r-- | parsing/printer.ml | 32 | ||||
| -rw-r--r-- | parsing/printer.mli | 3 |
2 files changed, 23 insertions, 12 deletions
diff --git a/parsing/printer.ml b/parsing/printer.ml index 232551984b..404e1b6ae7 100644 --- a/parsing/printer.ml +++ b/parsing/printer.ml @@ -489,14 +489,26 @@ let pr_prim_rule = function let prterm = pr_lconstr -(* spiwack: printer function for sets of Environ.assumption. - It is used primarily by the Print Assumption command. *) +(* Printer function for sets of Assumptions.assumptions. + It is used primarily by the Print Assumptions command. *) + +open Assumptions + let pr_assumptionset env s = - if (Environ.ContextObjectMap.is_empty s) then - str "Closed under the global context" + if ContextObjectMap.is_empty s then + str "Closed under the global context" ++ fnl() else + let safe_pr_constant env kn = + try pr_constant env kn + with Not_found -> + let mp,_,lab = repr_con kn in + str (string_of_mp mp ^ "." ^ string_of_label lab) + in + let safe_pr_ltype typ = + try str " : " ++ pr_ltype typ with _ -> mt () + in let (vars,axioms,opaque) = - Environ.ContextObjectMap.fold (fun t typ r -> + ContextObjectMap.fold (fun t typ r -> let (v,a,o) = r in match t with | Variable id -> ( Some ( @@ -511,9 +523,8 @@ let pr_assumptionset env s = | Axiom kn -> ( v , Some ( Option.default (fnl ()) a - ++ (pr_constant env kn) - ++ str " : " - ++ pr_ltype typ + ++ safe_pr_constant env kn + ++ safe_pr_ltype typ ++ fnl () ) , o @@ -521,9 +532,8 @@ let pr_assumptionset env s = | Opaque kn -> ( v , a , Some ( Option.default (fnl ()) o - ++ (pr_constant env kn) - ++ str " : " - ++ pr_ltype typ + ++ safe_pr_constant env kn + ++ safe_pr_ltype typ ++ fnl () ) ) diff --git a/parsing/printer.mli b/parsing/printer.mli index b7e581cd57..7e08d80fc0 100644 --- a/parsing/printer.mli +++ b/parsing/printer.mli @@ -134,7 +134,8 @@ val prterm : constr -> std_ppcmds (** = pr_lconstr *) (** spiwack: printer function for sets of Environ.assumption. It is used primarily by the Print Assumption command. *) -val pr_assumptionset : env -> Term.types Environ.ContextObjectMap.t ->std_ppcmds +val pr_assumptionset : + env -> Term.types Assumptions.ContextObjectMap.t ->std_ppcmds val pr_goal_by_id : string -> std_ppcmds |
