diff options
author | 2012-01-07 17:59:15 +0100 | |
---|---|---|
committer | 2012-01-07 18:20:56 +0100 | |
commit | 2ee61d5995ef572f0124691f10630305a59b4f73 (patch) | |
tree | eaeffb7be70ce770a822108f8a527312f67fd8b2 /parsing/printer.ml | |
parent | ba021624830c7ad5df0688d144e4305551ae1a5f (diff) | |
parent | de109d8c0c68f569b907e6e24271f259ba28888e (diff) |
Prepare upload to squeeze-backportsdebian/8.3.pl3+dfsg-1_bpo60+1
Diffstat (limited to 'parsing/printer.ml')
-rw-r--r-- | parsing/printer.ml | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/parsing/printer.ml b/parsing/printer.ml index cf0050a5..75cdead9 100644 --- a/parsing/printer.ml +++ b/parsing/printer.ml @@ -1,12 +1,12 @@ (************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) -(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2011 *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: printer.ml 13390 2010-09-02 08:03:01Z herbelin $ *) +(* $Id: printer.ml 14641 2011-11-06 11:59:10Z herbelin $ *) open Pp open Util @@ -499,14 +499,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 ( @@ -521,9 +533,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 @@ -531,9 +542,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 () ) ) |