aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/pp.ml
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2016-06-01 18:31:05 +0200
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-03-21 15:47:13 +0100
commit14155762a7cd46ed6a3e9cf2a58e11ee1244b188 (patch)
tree27d17f64dae70cb2e75828b6a22c66db6451d573 /lib/pp.ml
parent8c5adfd5acb883a3bc2850b6fc8c29d352a421f8 (diff)
[pp] Replace `Pp.Tag` by `Ppstyle.tag` = `string list`
This is what has always been used, so it doesn't represent a functional change. This is just a preliminary patch, but many more possibilities could be done wrt tags.
Diffstat (limited to 'lib/pp.ml')
-rw-r--r--lib/pp.ml24
1 files changed, 3 insertions, 21 deletions
diff --git a/lib/pp.ml b/lib/pp.ml
index a51b4458f..57d630a69 100644
--- a/lib/pp.ml
+++ b/lib/pp.ml
@@ -42,25 +42,7 @@ end = struct
end
-module Tag :
-sig
- type t
- type 'a key
- val create : string -> 'a key
- val inj : 'a -> 'a key -> t
- val prj : t -> 'a key -> 'a option
-end =
-struct
-
-module Dyn = Dyn.Make(struct end)
-
-type t = Dyn.t
-type 'a key = 'a Dyn.tag
-let create = Dyn.create
-let inj = Dyn.Easy.inj
-let prj = Dyn.Easy.prj
-
-end
+type pp_tag = string list
open Pp_control
@@ -95,7 +77,7 @@ type 'a ppcmd_token =
| Ppcmd_open_box of block_type
| Ppcmd_close_box
| Ppcmd_comment of string list
- | Ppcmd_open_tag of Tag.t
+ | Ppcmd_open_tag of pp_tag
| Ppcmd_close_tag
type 'a ppdir_token =
@@ -243,7 +225,7 @@ let rec pr_com ft s =
Some s2 -> Format.pp_force_newline ft (); pr_com ft s2
| None -> ()
-type tag_handler = Tag.t -> Format.tag
+type tag_handler = pp_tag -> Format.tag
(* pretty printing functions *)
let pp_dirs ?pp_tag ft =