tuned signature: more options;
authorwenzelm
Mon, 09 Sep 2024 21:45:56 +0200
changeset 80830 28f069b85eea
parent 80829 bdae6195a287
child 80831 c1521c003e78
tuned signature: more options;
src/Pure/General/pretty.ML
--- a/src/Pure/General/pretty.ML	Mon Sep 09 21:32:11 2024 +0200
+++ b/src/Pure/General/pretty.ML	Mon Sep 09 21:45:56 2024 +0200
@@ -74,6 +74,7 @@
     indent: string -> int -> Output.output,
     margin: int}
   val output_ops: int option -> output_ops
+  val markup_output_ops: int option -> output_ops
   val regularN: string
   val symbolicN: string
   val output_buffer: output_ops -> T -> Buffer.T
@@ -249,12 +250,12 @@
     val margin = the_default ML_Pretty.default_margin opt_margin;
   in {output = output, escape = escape, markup = markup, indent = indent, margin = margin} end;
 
-val markup_output_ops: output_ops =
+fun markup_output_ops opt_margin : output_ops =
  {output = #output Output.default_ops,
   escape = #escape Output.default_ops,
   markup = #markup markup_ops,
   indent = #indent markup_ops,
-  margin = ML_Pretty.default_margin};
+  margin = the_default ML_Pretty.default_margin opt_margin};
 
 fun output_newline (ops: output_ops) = #1 (#output ops "\n");
 
@@ -406,7 +407,7 @@
 (*symbolic markup -- no formatting*)
 val symbolic =
   let
-    val ops = markup_output_ops;
+    val ops = markup_output_ops NONE;
 
     fun buffer_markup m body =
       let val (bg, en) = #markup ops (YXML.output_markup m)