
9 Mar
2013
9 Mar
'13
2:53 a.m.
Hi Ivan,
*Main> test1 ____line_1 ____ ____line_2
The pretty-printer is doing what it _should_ be doing here (namely indenting everything in that block).
when you say "everything" you really mean "nothing", right? Notice that the line is empty. There is nothing to indent and these blanks are quite unnecessary. It's a bit of a stretch to say that the pretty printer should be adding them despite the fact that they serve no purpose.
to get rid of unneeded trailing whitespace the only thing I can think of is to post-process the output (e.g.: unlines . reverse . dropWhile isSpace . reverse . lines).
Well, if there is no other choice, then I'll do that. Take care, Peter