src/Tools/Metis/src/Print.sig
author wenzelm
Sat, 07 Apr 2012 16:41:59 +0200
changeset 47389 e8552cba702d
parent 45778 df6e210fb44c
child 72004 913162a47d9f
permissions -rw-r--r--
explicit checks stable_finished_theory/stable_command allow parallel asynchronous command transactions; tuned;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
     1
(* ========================================================================= *)
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
     2
(* PRETTY-PRINTING                                                           *)
39502
cffceed8e7fa fix license
blanchet
parents: 39501
diff changeset
     3
(* Copyright (c) 2008 Joe Hurd, distributed under the BSD License            *)
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
     4
(* ========================================================================= *)
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
     5
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
     6
signature Print =
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
     7
sig
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
     8
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
     9
(* ------------------------------------------------------------------------- *)
39443
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
    10
(* Escaping strings.                                                         *)
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
    11
(* ------------------------------------------------------------------------- *)
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
    12
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
    13
val escapeString : {escape : char list} -> string -> string
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
    14
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
    15
(* ------------------------------------------------------------------------- *)
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    16
(* A type of pretty-printers.                                                *)
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    17
(* ------------------------------------------------------------------------- *)
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    18
45778
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    19
type ppstream
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    20
45778
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    21
type 'a pp = 'a -> ppstream
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    22
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    23
val skip : ppstream
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    24
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    25
val sequence : ppstream -> ppstream -> ppstream
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    26
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    27
val duplicate : int -> ppstream -> ppstream
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    28
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    29
val program : ppstream list -> ppstream
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    30
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    31
val stream : ppstream Stream.stream -> ppstream
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    32
45778
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    33
val ppPpstream : ppstream pp
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    34
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    35
(* ------------------------------------------------------------------------- *)
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    36
(* Pretty-printing blocks.                                                   *)
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    37
(* ------------------------------------------------------------------------- *)
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    38
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    39
datatype style = Consistent | Inconsistent
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    40
45778
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    41
datatype block =
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    42
    Block of
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    43
      {style : style,
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    44
       indent : int}
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    45
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    46
val styleBlock : block -> style
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    47
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    48
val indentBlock : block -> int
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    49
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    50
val block : block -> ppstream -> ppstream
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    51
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    52
val consistentBlock : int -> ppstream list -> ppstream
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    53
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    54
val inconsistentBlock : int -> ppstream list -> ppstream
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    55
39443
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
    56
(* ------------------------------------------------------------------------- *)
45778
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    57
(* Words are unbreakable strings annotated with their effective size.        *)
39443
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
    58
(* ------------------------------------------------------------------------- *)
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    59
45778
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    60
datatype word = Word of {word : string, size : int}
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    61
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    62
val mkWord : string -> word
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    63
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    64
val emptyWord : word
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    65
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    66
val charWord : char -> word
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    67
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    68
val ppWord : word pp
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    69
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    70
val space : ppstream
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    71
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    72
val spaces : int -> ppstream
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    73
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    74
(* ------------------------------------------------------------------------- *)
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    75
(* Possible line breaks.                                                     *)
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    76
(* ------------------------------------------------------------------------- *)
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    77
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    78
datatype break = Break of {size : int, extraIndent : int}
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    79
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    80
val mkBreak : int -> break
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    81
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    82
val ppBreak : break pp
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    83
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    84
val break : ppstream
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    85
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    86
val breaks : int -> ppstream
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    87
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    88
(* ------------------------------------------------------------------------- *)
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    89
(* Forced line breaks.                                                       *)
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    90
(* ------------------------------------------------------------------------- *)
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    91
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    92
val newline : ppstream
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    93
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
    94
val newlines : int -> ppstream
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    95
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    96
(* ------------------------------------------------------------------------- *)
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    97
(* Pretty-printer combinators.                                               *)
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    98
(* ------------------------------------------------------------------------- *)
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
    99
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   100
val ppMap : ('a -> 'b) -> 'b pp -> 'a pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   101
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   102
val ppBracket : string -> string -> 'a pp -> 'a pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   103
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   104
val ppOp : string -> ppstream
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   105
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   106
val ppOp2 : string -> 'a pp -> 'b pp -> ('a * 'b) pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   107
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   108
val ppOp3 : string -> string -> 'a pp -> 'b pp -> 'c pp -> ('a * 'b * 'c) pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   109
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   110
val ppOpList : string -> 'a pp -> 'a list pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   111
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   112
val ppOpStream : string -> 'a pp -> 'a Stream.stream pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   113
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   114
(* ------------------------------------------------------------------------- *)
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   115
(* Pretty-printers for common types.                                         *)
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   116
(* ------------------------------------------------------------------------- *)
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   117
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   118
val ppChar : char pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   119
45778
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   120
val ppString : string pp
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   121
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   122
val ppEscapeString : {escape : char list} -> string pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   123
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   124
val ppUnit : unit pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   125
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   126
val ppBool : bool pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   127
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   128
val ppInt : int pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   129
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   130
val ppPrettyInt : int pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   131
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   132
val ppReal : real pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   133
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   134
val ppPercent : real pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   135
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   136
val ppOrder : order pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   137
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   138
val ppList : 'a pp -> 'a list pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   139
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   140
val ppStream : 'a pp -> 'a Stream.stream pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   141
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   142
val ppOption : 'a pp -> 'a option pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   143
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   144
val ppPair : 'a pp -> 'b pp -> ('a * 'b) pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   145
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   146
val ppTriple : 'a pp -> 'b pp -> 'c pp -> ('a * 'b * 'c) pp
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   147
42102
fcfd07f122d4 new version of Metis 2.3 (29 Dec. 2010)
blanchet
parents: 39502
diff changeset
   148
val ppException : exn pp
fcfd07f122d4 new version of Metis 2.3 (29 Dec. 2010)
blanchet
parents: 39502
diff changeset
   149
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   150
(* ------------------------------------------------------------------------- *)
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   151
(* Pretty-printing infix operators.                                          *)
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   152
(* ------------------------------------------------------------------------- *)
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   153
39443
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
   154
type token = string
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
   155
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
   156
datatype assoc =
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
   157
    LeftAssoc
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
   158
  | NonAssoc
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
   159
  | RightAssoc
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
   160
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   161
datatype infixes =
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   162
    Infixes of
39443
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
   163
      {token : token,
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   164
       precedence : int,
39443
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
   165
       assoc : assoc} list
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   166
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   167
val tokensInfixes : infixes -> StringSet.set
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   168
39443
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
   169
val layerInfixes : infixes -> {tokens : StringSet.set, assoc : assoc} list
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   170
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   171
val ppInfixes :
39443
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
   172
    infixes ->
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
   173
    ('a -> (token * 'a * 'a) option) -> ('a * token) pp ->
e330437cd22a copied the unmodified official Metis 2.3 (15 Sept. 2010) sources into Isabelle
blanchet
parents: 39349
diff changeset
   174
    ('a * bool) pp -> ('a * bool) pp
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   175
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   176
(* ------------------------------------------------------------------------- *)
45778
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   177
(* Pretty-printer rendering.                                                 *)
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   178
(* ------------------------------------------------------------------------- *)
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   179
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   180
val render :
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   181
    {lineLength : int option} -> ppstream ->
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   182
    {indent : int, line : string} Stream.stream
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   183
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   184
val toStringWithLineLength :
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   185
    {lineLength : int option} -> 'a pp -> 'a -> string
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   186
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   187
val toStreamWithLineLength :
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   188
    {lineLength : int option} -> 'a pp -> 'a -> string Stream.stream
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   189
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   190
val toLine : 'a pp -> 'a -> string
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   191
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   192
(* ------------------------------------------------------------------------- *)
df6e210fb44c updated Metis to 20110926 version
blanchet
parents: 43269
diff changeset
   193
(* Pretty-printer rendering with a global line length.                       *)
39348
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   194
(* ------------------------------------------------------------------------- *)
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   195
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   196
val lineLength : int ref
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   197
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   198
val toString : 'a pp -> 'a -> string
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   199
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   200
val toStream : 'a pp -> 'a -> string Stream.stream
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   201
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   202
val trace : 'a pp -> string -> 'a -> unit
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   203
6f9c9899f99f new version of the Metis files
blanchet
parents:
diff changeset
   204
end