pprint: back to proper output of markup, with workaround for Poly/ML crash;
authorwenzelm
Wed, 25 Jun 2008 12:15:05 +0200
changeset 27351 6b120fb45278
parent 27350 c8adf88960ad
child 27352 8adeff7fd4bc
pprint: back to proper output of markup, with workaround for Poly/ML crash;
src/Pure/General/pretty.ML
--- a/src/Pure/General/pretty.ML	Tue Jun 24 23:38:44 2008 +0200
+++ b/src/Pure/General/pretty.ML	Wed Jun 25 12:15:05 2008 +0200
@@ -320,9 +320,13 @@
   in fmt (prune prt) Buffer.empty end;
 
 (*ML toplevel pretty printing*)
-fun pprint prt (put_str, begin_blk, put_brk, put_fbrk, end_blk) =
+fun pprint prt (put_str0, begin_blk, put_brk, put_fbrk, end_blk) =
   let
-    fun pp (Block (_, prts, ind, _)) = (begin_blk ind; pp_lst prts; end_blk ())
+    fun put_str "" = ()
+      | put_str s = put_str0 s;
+    fun pp (Block (m, prts, ind, _)) =
+          let val (bg, en) = Markup.output m
+          in put_str bg; begin_blk ind; pp_lst prts; end_blk (); put_str en end
       | pp (String (s, _)) = put_str s
       | pp (Break (false, wd)) = put_brk wd
       | pp (Break (true, _)) = put_fbrk ()