X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=components%2Facic_content%2FcicNotationPp.ml;h=5f45b2a4ba72d23ea6f942d6124357578f3b2508;hb=613077e2729b7a66cf10b4b930b431b73a0062c2;hp=5dc6fd821c380f311a37005d5ed5057af33b2352;hpb=7f2444c2670cadafddd8785b687ef312158376b0;p=helm.git diff --git a/components/acic_content/cicNotationPp.ml b/components/acic_content/cicNotationPp.ml index 5dc6fd821..5f45b2a4b 100644 --- a/components/acic_content/cicNotationPp.ml +++ b/components/acic_content/cicNotationPp.ml @@ -171,9 +171,14 @@ and pp_pattern ((head, href, vars), term) = and pp_patterns patterns = sprintf "[%s]" (String.concat " | " (List.map pp_pattern patterns)) -and pp_capture_variable = function +and pp_capture_variable = + let clean s = + let s = String.sub s 1 (String.length s - 1) in + String.sub s 0 (String.length s - 1) + in + function | term, None -> pp_term term - | term, Some typ -> "(" ^ pp_term term ^ ": " ^ pp_term typ ^ ")" + | term, Some typ -> "(" ^ clean (pp_term term) ^ ": " ^ pp_term typ ^ ")" and pp_box_spec (kind, spacing, indent) = let int_of_bool b = if b then 1 else 0 in @@ -234,7 +239,9 @@ and pp_variable = function | Ast.Ascription (t, n) -> assert false | Ast.FreshVar n -> "fresh " ^ n -let pp_term t = pp_term ~pp_parens:false t +let _pp_term = ref (pp_term ~pp_parens:false) +let pp_term t = !_pp_term t +let set_pp_term f = _pp_term := f let pp_params = function | [] -> "" @@ -247,12 +254,13 @@ let pp_params = function let pp_flavour = function | `Definition -> "Definition" - | `Fact -> "Fact" - | `Goal -> "Goal" - | `Lemma -> "Lemma" - | `Remark -> "Remark" - | `Theorem -> "Theorem" - | `Variant -> "Variant" + | `Fact -> "fact" + | `Goal -> "goal" + | `Lemma -> "lemma" + | `Remark -> "remark" + | `Theorem -> "theorem" + | `Variant -> "variant" + | `Axiom -> "axiom" let pp_fields fields = (if fields <> [] then "\n" else "") ^