X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_notation%2FgrafiteAstPp.ml;h=0c63d2594d0ea4e4398a7902981302ee2e7aa47c;hb=3a12950125e7a4a792546aacea40505f3cecae89;hp=c15b6fe7144bf6f43bba96aabd22ef434ace8980;hpb=08ecc780b3b0a4cac7ed72cf68c310e4eeffa2c1;p=helm.git diff --git a/helm/ocaml/cic_notation/grafiteAstPp.ml b/helm/ocaml/cic_notation/grafiteAstPp.ml index c15b6fe71..0c63d2594 100644 --- a/helm/ocaml/cic_notation/grafiteAstPp.ml +++ b/helm/ocaml/cic_notation/grafiteAstPp.ml @@ -27,6 +27,8 @@ open Printf open GrafiteAst +module Ast = CicNotationPt + let tactical_terminator = "." let tactic_terminator = tactical_terminator let command_terminator = tactical_terminator @@ -39,10 +41,12 @@ let pp_idents idents = "[" ^ String.concat "; " idents ^ "]" let pp_terms_ast terms = String.concat ", " (List.map pp_term_ast terms) let pp_reduction_kind = function + | `Normalize -> "normalize" | `Reduce -> "reduce" | `Simpl -> "simplify" + | `Unfold (Some t) -> "unfold " ^ pp_term_ast t + | `Unfold None -> "unfold" | `Whd -> "whd" - | `Normalize -> "normalize" let pp_pattern (t, hyp, goal) = @@ -237,7 +241,7 @@ let pp_obj = function pp_fields fields ^ "}" let pp_argument_pattern = function - | CicNotationPt.IdentArg (eta_depth, name) -> + | Ast.IdentArg (eta_depth, name) -> let eta_buf = Buffer.create 5 in for i = 1 to eta_depth do Buffer.add_string eta_buf "\\eta." @@ -245,10 +249,10 @@ let pp_argument_pattern = function sprintf "%s%s" (Buffer.contents eta_buf) name let rec pp_cic_appl_pattern = function - | CicNotationPt.UriPattern uri -> UriManager.string_of_uri uri - | CicNotationPt.VarPattern name -> name - | CicNotationPt.ImplicitPattern -> "_" - | CicNotationPt.ApplPattern aps -> + | Ast.UriPattern uri -> UriManager.string_of_uri uri + | Ast.VarPattern name -> name + | Ast.ImplicitPattern -> "_" + | Ast.ApplPattern aps -> sprintf "(%s)" (String.concat " " (List.map pp_cic_appl_pattern aps)) let pp_l1_pattern = CicNotationPp.pp_term