]> matita.cs.unibo.it Git - helm.git/blobdiff - components/grafite/grafiteAstPp.ml
now destruct takes an optional list of term rather than a sigle optional term
[helm.git] / components / grafite / grafiteAstPp.ml
index eb1a18e5ad00d365ba23e3db088b620ece02ceab..cf9106ea374d44527481c5e12297be63ee52f9f2 100644 (file)
@@ -68,13 +68,14 @@ let pp_intros_specs s = function
    | None, idents     -> Printf.sprintf " %s%s" s (pp_idents idents)
    | Some num, idents -> Printf.sprintf " %s%i %s" s num (pp_idents idents)
 
-let terms_pp ~term_pp terms = String.concat ", " (List.map term_pp terms)
+let pp_terms ~term_pp terms = String.concat ", " (List.map term_pp terms)
 
 let opt_string_pp = function
    | None -> ""
    | Some what -> what ^ " "
 
 let rec pp_tactic ~map_unicode_to_tex ~term_pp ~lazy_term_pp =
+ let pp_terms = pp_terms ~term_pp in
  let pp_tactics = pp_tactics ~map_unicode_to_tex ~term_pp ~lazy_term_pp in
  let pp_reduction_kind = pp_reduction_kind ~term_pp in
  let pp_tactic_pattern =
@@ -127,7 +128,7 @@ let rec pp_tactic ~map_unicode_to_tex ~term_pp ~lazy_term_pp =
       (pp_intros_specs "names " (None, names)) 
   | Demodulate _ -> "demodulate"
   | Destruct (_, None) -> "destruct" 
-  | Destruct (_, Some term) -> "destruct " ^ term_pp term
+  | Destruct (_, Some terms) -> "destruct " ^ pp_terms terms
   | Elim (_, what, using, pattern, specs) ->
       Printf.sprintf "elim %s%s %s%s" 
       (term_pp what)
@@ -159,7 +160,7 @@ let rec pp_tactic ~map_unicode_to_tex ~term_pp ~lazy_term_pp =
         (if linear then " linear " else "")
        (match level_opt with None -> "" | Some i -> " depth = " ^ string_of_int i ^ " ")  
         (term_pp term) 
-        (match terms with [] -> "" | _ -> " to " ^ terms_pp ~term_pp terms)
+        (match terms with [] -> "" | _ -> " to " ^ pp_terms terms)
         (match ident_opt with None -> "" | Some ident -> " as " ^ ident)
   | Left _ -> "left"
   | LetIn (_, term, ident) ->