I use wl-pprint package, because the standard PrettyPrinter lacks functionality. All is good, except an empty doc in a vcat function (the same thing with <$> combinator).
Correct behavior:
import Text.PrettyPrint
> vcat[text "a", empty, text "b"]
a
b
wl-pprint shows an extra blank line:
import Text.PrettyPrint.Leijen
> vcat[text "a", empty, text "b"]
a
b
So what can I do? It is imposible to filter vcat list, because there is no Eq instance for Doc.
Because I hadn’t have any better ideas, I made the following changes in the source