]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_transformations/tacticAstPp.ml
debian: rebuilt against ocaml 3.08.3
[helm.git] / helm / ocaml / cic_transformations / tacticAstPp.ml
index bc021c134a21d23a8203f7a9876ed5a31d335201..0d539ddbe93cf0c5f450d4fd6fd8c90cde708ed2 100644 (file)
@@ -27,6 +27,9 @@ open Printf
 
 open TacticAst
 
+let tactical_terminator = "."
+let tactical_separator = ";"
+
 let pp_term term = CicAstPp.pp_term term
 
 let pp_idents idents = "[" ^ String.concat "; " idents ^ "]"
@@ -62,6 +65,7 @@ let rec pp_tactic = function
   | Fourier -> "fourier"
   | Hint -> "hint"
   | Injection ident -> "injection " ^ ident
+  | Intros (None, []) -> "intro"
   | Intros (num, idents) ->
       sprintf "intros%s%s"
         (match num with None -> "" | Some num -> " " ^ string_of_int num)
@@ -96,6 +100,12 @@ let pp_flavour = function
   | `Remark -> "Remark"
   | `Theorem -> "Theorem"
 
+let pp_search_kind = function
+  | `Locate -> "locate"
+  | `Hint -> "hint"
+  | `Match -> "match"
+  | `Elim -> "elim"
+
 let pp_command = function
   | Abort -> "Abort"
   | Baseuri (Some uri) -> sprintf "Baseuri \"%s\"" uri
@@ -107,6 +117,10 @@ let pp_command = function
   | Quit -> "Quit"
   | Redo None -> "Redo"
   | Redo (Some n) -> sprintf "Redo %d" n
+  | Search_pat (kind, pat) ->
+      sprintf "search %s \"%s\"" (pp_search_kind kind) pat
+  | Search_term (kind, term) ->
+      sprintf "search %s %s" (pp_search_kind kind) (pp_term term)
   | Inductive (params, types) ->
       let pp_params = function
         | [] -> ""
@@ -161,7 +175,8 @@ let rec pp_tactical = function
   | Tries tacs -> sprintf "tries [%s]" (pp_tacticals tacs)
   | Try tac -> "try " ^ pp_tactical tac
 
-and pp_tacticals tacs = String.concat "; " (List.map pp_tactical tacs)
+and pp_tacticals tacs =
+  String.concat (tactical_separator ^ " ") (List.map pp_tactical tacs)
 
-let pp_tactical tac = pp_tactical tac ^ "."
+let pp_tactical tac = pp_tactical tac ^ tactical_terminator