src/Pure/ML/ml_pp.ML
author wenzelm
Thu, 23 Jan 2025 22:19:30 +0100
changeset 81960 326ecfc079a6
parent 80815 cd10c7c9f25c
permissions -rw-r--r--
support for @{instantiate (no_beta) ...};
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
62665
a78ce0c6e191 clarified modules;
wenzelm
parents: 62663
diff changeset
     1
(*  Title:      Pure/ML/ml_pp.ML
38327
d6afb77b0f6d more precise and more maintainable dependencies;
wenzelm
parents: 33767
diff changeset
     2
    Author:     Makarius
30633
cc18ae3c1c7f extra toplevel pretty-printing for Poly/ML; experimental version for Poly/ML 5.3;
wenzelm
parents:
diff changeset
     3
62665
a78ce0c6e191 clarified modules;
wenzelm
parents: 62663
diff changeset
     4
ML toplevel pretty-printing for logical entities.
30633
cc18ae3c1c7f extra toplevel pretty-printing for Poly/ML; experimental version for Poly/ML 5.3;
wenzelm
parents:
diff changeset
     5
*)
cc18ae3c1c7f extra toplevel pretty-printing for Poly/ML; experimental version for Poly/ML 5.3;
wenzelm
parents:
diff changeset
     6
80812
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
     7
signature ML_PP =
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
     8
sig
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
     9
  val toplevel_context: unit -> Proof.context
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    10
  val pp_context: Proof.context -> Pretty.T
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    11
  val pp_typ: Proof.context -> typ -> Pretty.T
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    12
  val pp_term: Proof.context -> term -> Pretty.T
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    13
  val pp_thm: Proof.context -> thm -> Pretty.T
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    14
end;
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    15
80815
cd10c7c9f25c proper signature (amending 0f820da558f9);
wenzelm
parents: 80813
diff changeset
    16
structure ML_PP: ML_PP =
62665
a78ce0c6e191 clarified modules;
wenzelm
parents: 62663
diff changeset
    17
struct
62356
wenzelm
parents: 52426
diff changeset
    18
80812
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    19
(* logical context *)
80803
7e39c785ca5d clarified modules: enable pretty.ML to use XML/YXML more directly;
wenzelm
parents: 79127
diff changeset
    20
80812
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    21
(*ML compiler toplevel context: fallback on theory Pure for regular runtime*)
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    22
fun toplevel_context () =
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    23
  let
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    24
    fun global_context () =
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    25
      Theory.get_pure ()
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    26
      |> Config.put_global Name_Space.names_long true
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    27
      |> Syntax.init_pretty_global;
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    28
  in
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    29
    (case Context.get_generic_context () of
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    30
      SOME (Context.Proof ctxt) => ctxt
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    31
    | SOME (Context.Theory thy) =>
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    32
        (case try Syntax.init_pretty_global thy of
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    33
          SOME ctxt => ctxt
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    34
        | NONE => global_context ())
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    35
    | NONE => global_context ())
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    36
  end;
80803
7e39c785ca5d clarified modules: enable pretty.ML to use XML/YXML more directly;
wenzelm
parents: 79127
diff changeset
    37
80812
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    38
fun pp_context ctxt =
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    39
 (if Config.get ctxt Proof_Context.debug then
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    40
    Pretty.quote (Pretty.big_list "proof context:" (Proof_Context.pretty_context ctxt))
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    41
  else Pretty.str "<context>");
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    42
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    43
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    44
(* logical entities (with syntax) *)
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    45
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    46
fun pp_typ ctxt T = Pretty.quote (Syntax.pretty_typ ctxt T);
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    47
fun pp_term ctxt t = Pretty.quote (Syntax.pretty_term ctxt t);
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    48
fun pp_thm ctxt th = Thm.pretty_thm_raw ctxt {quote = true, show_hyps = false} th;
78649
d46006355819 add ML_system_pp for type Isabelle_Thread.T;
wenzelm
parents: 71777
diff changeset
    49
d46006355819 add ML_system_pp for type Isabelle_Thread.T;
wenzelm
parents: 71777
diff changeset
    50
val _ =
80812
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    51
  ML_system_pp (fn _ => fn _ => Pretty.to_ML o pp_context);
62665
a78ce0c6e191 clarified modules;
wenzelm
parents: 62663
diff changeset
    52
a78ce0c6e191 clarified modules;
wenzelm
parents: 62663
diff changeset
    53
val _ =
80812
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    54
  ML_system_pp (fn depth => fn _ => fn th =>
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    55
    ML_Pretty.prune depth (Pretty.to_ML (pp_thm (toplevel_context ()) th)));
62356
wenzelm
parents: 52426
diff changeset
    56
62665
a78ce0c6e191 clarified modules;
wenzelm
parents: 62663
diff changeset
    57
val _ =
80812
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    58
  ML_system_pp (fn depth => fn _ => fn ct =>
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    59
    ML_Pretty.prune depth (Pretty.to_ML (pp_term (toplevel_context ()) (Thm.term_of ct))));
33767
f962c761a38f toplevel pretty printer for Synchronized.var;
wenzelm
parents: 33545
diff changeset
    60
62665
a78ce0c6e191 clarified modules;
wenzelm
parents: 62663
diff changeset
    61
val _ =
80812
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    62
  ML_system_pp (fn depth => fn _ => fn cT =>
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    63
    ML_Pretty.prune depth (Pretty.to_ML (pp_typ (toplevel_context ()) (Thm.typ_of cT))));
30633
cc18ae3c1c7f extra toplevel pretty-printing for Poly/ML; experimental version for Poly/ML 5.3;
wenzelm
parents:
diff changeset
    64
79127
830f68f92ad7 more ML pretty-printing;
wenzelm
parents: 78649
diff changeset
    65
val _ =
80812
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    66
  ML_system_pp (fn depth => fn _ => fn T =>
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    67
    ML_Pretty.prune depth (Pretty.to_ML (pp_typ (toplevel_context ()) T)));
80809
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
    68
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
    69
val _ =
80812
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    70
  ML_system_pp (fn depth => fn _ => fn T =>
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    71
    ML_Pretty.prune depth (Pretty.to_ML (pp_typ (toplevel_context ()) (ZTerm.typ_of T))));
79127
830f68f92ad7 more ML pretty-printing;
wenzelm
parents: 78649
diff changeset
    72
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    73
80812
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    74
(* ML term and proofterm *)
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
    75
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    76
local
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    77
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    78
fun prt_app name prt = Pretty.block [Pretty.str (name ^ " "), prt];
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    79
fun prt_apps name = Pretty.enum "," (name ^ " (") ")";
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    80
62387
ad3eb2889f9a support for polyml-git ec49a49972c5 (branch FixedPrecisionInt);
wenzelm
parents: 62356
diff changeset
    81
fun prt_term parens (dp: FixedInt.int) t =
80813
9dd4dcb08d37 clarified signature, following 1f718be3608b: Pretty.str is now value-oriented;
wenzelm
parents: 80812
diff changeset
    82
  if dp <= 0 then Pretty.dots
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    83
  else
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    84
    (case t of
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    85
      _ $ _ =>
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    86
        op :: (strip_comb t)
62387
ad3eb2889f9a support for polyml-git ec49a49972c5 (branch FixedPrecisionInt);
wenzelm
parents: 62356
diff changeset
    87
        |> map_index (fn (i, u) => prt_term true (dp - FixedInt.fromInt i - 1) u)
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    88
        |> Pretty.separate " $"
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    89
        |> (if parens then Pretty.enclose "(" ")" else Pretty.block)
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    90
    | Abs (a, T, b) =>
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    91
        prt_apps "Abs"
80809
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
    92
         [Pretty.from_ML (ML_system_pretty (a, dp - 1)),
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
    93
          Pretty.from_ML (ML_system_pretty (T, dp - 2)),
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    94
          prt_term false (dp - 3) b]
80809
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
    95
    | Const a => prt_app "Const" (Pretty.from_ML (ML_system_pretty (a, dp - 1)))
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
    96
    | Free a => prt_app "Free" (Pretty.from_ML (ML_system_pretty (a, dp - 1)))
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
    97
    | Var a => prt_app "Var" (Pretty.from_ML (ML_system_pretty (a, dp - 1)))
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
    98
    | Bound a => prt_app "Bound" (Pretty.from_ML (ML_system_pretty (a, dp - 1))));
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
    99
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   100
fun prt_proof parens dp prf =
80813
9dd4dcb08d37 clarified signature, following 1f718be3608b: Pretty.str is now value-oriented;
wenzelm
parents: 80812
diff changeset
   101
  if dp <= 0 then Pretty.dots
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   102
  else
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   103
    (case prf of
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   104
      _ % _ => prt_proofs parens dp prf
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   105
    | _ %% _ => prt_proofs parens dp prf
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   106
    | Abst (a, T, b) =>
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   107
        prt_apps "Abst"
80809
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
   108
         [Pretty.from_ML (ML_system_pretty (a, dp - 1)),
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
   109
          Pretty.from_ML (ML_system_pretty (T, dp - 2)),
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   110
          prt_proof false (dp - 3) b]
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   111
    | AbsP (a, t, b) =>
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   112
        prt_apps "AbsP"
80809
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
   113
         [Pretty.from_ML (ML_system_pretty (a, dp - 1)),
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
   114
          Pretty.from_ML (ML_system_pretty (t, dp - 2)),
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   115
          prt_proof false (dp - 3) b]
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   116
    | Hyp t => prt_app "Hyp" (prt_term true (dp - 1) t)
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   117
    | MinProof => Pretty.str "MinProof"
80809
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
   118
    | PBound a => prt_app "PBound" (Pretty.from_ML (ML_system_pretty (a, dp - 1)))
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
   119
    | PAxm a => prt_app "PAxm" (Pretty.from_ML (ML_system_pretty (a, dp - 1)))
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
   120
    | PClass a => prt_app "PClass" (Pretty.from_ML (ML_system_pretty (a, dp - 1)))
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
   121
    | Oracle a => prt_app "Oracle" (Pretty.from_ML (ML_system_pretty (a, dp - 1)))
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
   122
    | PThm a => prt_app "PThm" (Pretty.from_ML (ML_system_pretty (a, dp - 1))))
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   123
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   124
and prt_proofs parens dp prf =
33545
d8903f0002e5 home-grown pretty printer for term -- Poly/ML 5.3.0 does not observe infix status of constructors (notably $);
wenzelm
parents: 33538
diff changeset
   125
  let
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   126
    val (head, args) = strip_proof prf [];
62387
ad3eb2889f9a support for polyml-git ec49a49972c5 (branch FixedPrecisionInt);
wenzelm
parents: 62356
diff changeset
   127
    val prts =
ad3eb2889f9a support for polyml-git ec49a49972c5 (branch FixedPrecisionInt);
wenzelm
parents: 62356
diff changeset
   128
      head (dp - 1) :: flat (map_index (fn (i, prt) => prt (dp - FixedInt.fromInt i - 2)) args);
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   129
  in if parens then Pretty.enclose "(" ")" prts else Pretty.block prts end
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   130
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   131
and strip_proof (p % t) res =
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   132
      strip_proof p
62665
a78ce0c6e191 clarified modules;
wenzelm
parents: 62663
diff changeset
   133
        ((fn d =>
a78ce0c6e191 clarified modules;
wenzelm
parents: 62663
diff changeset
   134
          [Pretty.str " %", Pretty.brk 1,
80809
4a64fc4d1cde clarified signature: type ML_Pretty.pretty coincides with PolyML.pretty;
wenzelm
parents: 80808
diff changeset
   135
            Pretty.from_ML (ML_system_pretty (t, d))]) :: res)
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   136
  | strip_proof (p %% q) res =
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   137
      strip_proof p ((fn d => [Pretty.str " %%", Pretty.brk 1, prt_proof true d q]) :: res)
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   138
  | strip_proof p res = (fn d => prt_proof true d p, res);
33545
d8903f0002e5 home-grown pretty printer for term -- Poly/ML 5.3.0 does not observe infix status of constructors (notably $);
wenzelm
parents: 33538
diff changeset
   139
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   140
in
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   141
80812
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
   142
val _ = ML_system_pp (fn depth => fn _ => Pretty.to_ML o prt_term false depth);
0f820da558f9 clarified signature and modules;
wenzelm
parents: 80810
diff changeset
   143
val _ = ML_system_pp (fn depth => fn _ => fn prf => Pretty.to_ML (prt_proof false depth prf));
52426
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   144
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   145
end;
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   146
81e27230a8b7 ML pretty printer for proof terms, with specifica treatment of infix application (similar to terms);
wenzelm
parents: 52425
diff changeset
   147
end;