src/Pure/ML/ml_print_depth0.ML
author wenzelm
Mon, 01 Apr 2024 15:37:55 +0200
changeset 80064 0d94dd2fd2d0
parent 62900 c641bf9402fd
permissions -rw-r--r--
clarified names (see also 9c00a46d69d0, c5cd7a58cf2d); NB: Simplifier.set_trace_ops overrides Pure setup for Simplifier_Trace panel, but that is hardly every used in practice;

(*  Title:      Pure/ML/ml_print_depth0.ML
    Author:     Makarius

Print depth for ML toplevel pp -- global default (unsynchronized).
*)

signature ML_PRINT_DEPTH =
sig
  val set_print_depth: int -> unit
  val get_print_depth: unit -> int
end;

structure ML_Print_Depth: ML_PRINT_DEPTH =
struct

val depth = Unsynchronized.ref 0;

fun set_print_depth n = (depth := n; PolyML.print_depth n);
fun get_print_depth () = ! depth;

end;