equal
deleted
inserted
replaced
|
1 (* Title: Pure/ML/ml_print_depth0.ML |
|
2 Author: Makarius |
|
3 |
|
4 Print depth for ML toplevel pp -- global default (unsynchronized). |
|
5 *) |
|
6 |
|
7 signature ML_PRINT_DEPTH = |
|
8 sig |
|
9 val set_print_depth: int -> unit |
|
10 val get_print_depth: unit -> int |
|
11 val get_print_depth_default: int -> int |
|
12 end; |
|
13 |
|
14 structure ML_Print_Depth: ML_PRINT_DEPTH = |
|
15 struct |
|
16 |
|
17 val depth = Unsynchronized.ref 0; |
|
18 |
|
19 fun set_print_depth n = (depth := n; PolyML.print_depth n); |
|
20 fun get_print_depth () = ! depth; |
|
21 fun get_print_depth_default _ = ! depth; |
|
22 |
|
23 end; |