aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/pp.ml21
-rw-r--r--lib/pp.mli3
2 files changed, 0 insertions, 24 deletions
diff --git a/lib/pp.ml b/lib/pp.ml
index 6e6b32c59..d672f06db 100644
--- a/lib/pp.ml
+++ b/lib/pp.ml
@@ -18,7 +18,6 @@ module Glue : sig
val empty : 'a t
val is_empty : 'a t -> bool
val iter : ('a -> unit) -> 'a t -> unit
- val map : ('a -> 'b) -> 'a t -> 'b t
end = struct
@@ -41,11 +40,6 @@ end = struct
| GLeaf x -> f x
| GNode (x,y) -> iter f x; iter f y
- let rec map f = function
- | GEmpty -> GEmpty
- | GLeaf x -> GLeaf (f x)
- | GNode (x,y) -> GNode (map f x, map f y)
-
end
module Tag :
@@ -156,21 +150,6 @@ let app = Glue.glue
let is_empty g = Glue.is_empty g
-let rewrite f p =
- let strtoken = function
- | Str_len (s, n) ->
- let s' = f s in
- Str_len (s', String.length s')
- | Str_def s ->
- Str_def (f s)
- in
- let rec ppcmd_token = function
- | Ppcmd_print x -> Ppcmd_print (strtoken x)
- | Ppcmd_box (bt, g) -> Ppcmd_box (bt, Glue.map ppcmd_token g)
- | p -> p
- in
- Glue.map ppcmd_token p
-
(* Compute length of an UTF-8 encoded string
Rem 1 : utf8_length <= String.length (equal if pure ascii)
Rem 2 : if used for an iso8859_1 encoded string, the result is
diff --git a/lib/pp.mli b/lib/pp.mli
index 5dd2686d1..e20e5ca82 100644
--- a/lib/pp.mli
+++ b/lib/pp.mli
@@ -46,9 +46,6 @@ val eval_ppcmds : std_ppcmds -> std_ppcmds
val is_empty : std_ppcmds -> bool
(** Test emptyness. *)
-val rewrite : (string -> string) -> std_ppcmds -> std_ppcmds
-(** [rewrite f pps] applies [f] to all strings that appear in [pps]. *)
-
(** {6 Derived commands} *)
val spc : unit -> std_ppcmds