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