]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_notation/grafiteAstPp.ml
added homepage URL, now we have one
[helm.git] / helm / ocaml / cic_notation / grafiteAstPp.ml
index 6af1efd714406afea6c87e2bf0d37af966b402ae..7d1f8c22e843e53a5c942851e897c35f2be6d083 100644 (file)
@@ -39,10 +39,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) = 
@@ -261,6 +263,11 @@ let pp_associativity = function
 
 let pp_precedence i = sprintf "with precedence %d" i
 
+let pp_dir_opt = function
+  | None -> ""
+  | Some `LeftToRight -> "> "
+  | Some `RightToLeft -> "< "
+
 let pp_command = function
   | Include (_,path) -> "include " ^ path
   | Qed _ -> "qed"
@@ -277,8 +284,9 @@ let pp_command = function
         dsc symbol
         (String.concat " " (List.map pp_argument_pattern arg_patterns))
         (pp_cic_appl_pattern cic_appl_pattern)
-  | Notation (_, l1_pattern, assoc, prec, l2_pattern) ->
-      sprintf "notation \"%s\" %s %s for %s"
+  | Notation (_, dir_opt, l1_pattern, assoc, prec, l2_pattern) ->
+      sprintf "notation %s\"%s\" %s %s for %s"
+        (pp_dir_opt dir_opt)
         (pp_l1_pattern l1_pattern)
         (pp_associativity assoc)
         (pp_precedence prec)