]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/basic_ag/bagOutput.ml
Regular expressions.
[helm.git] / helm / software / lambda-delta / basic_ag / bagOutput.ml
index eb3bf05d90bea375409a45151bebe76c936b11c7..0bfc13ee64c3b4de9274a62f450cf583e9fc2369 100644 (file)
@@ -13,8 +13,9 @@ module P = Printf
 module F = Format
 module U = NUri
 module L = Log
+module O = Options
+module Y = Entity
 module H = Hierarchy
-module O = Output
 module B = Bag
 
 type counters = {
@@ -62,21 +63,14 @@ and count_term f c = function
       let f c = count_term_binder f c b in
       count_term f c t
 
-let count_entry_binder f c = function
-   | B.Abst w -> 
+let count_entity f c = function
+   | _, _, Y.Abst w -> 
       let c = {c with eabsts = succ c.eabsts} in
       count_term f c w
-   | B.Abbr v -> 
+   | _, _, Y.Abbr v -> 
       let c = {c with eabbrs = succ c.eabbrs} in
       count_term f c v
-   | B.Void   -> f c
-
-let count_entry f c (_, _, b) =
-   count_entry_binder f c b
-
-let count_unit f c = function
-   | Some entry -> count_entry f c entry
-   | None     -> f c
+   | _, _, Y.Void   -> assert false
 
 let print_counters f c =
    let terms =
@@ -107,7 +101,7 @@ let rec pp_term c frm = function
    | B.Sort h                 -> 
       let err () = F.fprintf frm "@[*%u@]" h in
       let f s = F.fprintf frm "@[%s@]" s in
-      H.get_sort err f h 
+      H.string_of_sort err f h 
    | B.LRef i                 -> 
       let f = function
          | Some (id, _) -> F.fprintf frm "@[%s@]" id