[Haskell-cafe] Side-by-side pretty printing
Michael Lazarev
lazarev.michael at gmail.com
Tue Aug 5 19:49:02 UTC 2014
Hi all,
When looking into Text.PrettyPrint, I stumbled upon <> (beside) combinator.
Is it true that multi-line documents can't be printed one beside other?
E.g. this
let doc1 = vcat $ map text ["This", "is", "a", "document"]
in doc1 <> doc1
prints this:
This
is
a
documentThis
is
a
document
As well as if I would write `doc1 <> nest 50 doc1`.
What I was expecting, was
This This
is is
a a
documentdocument
Do I get it right that Text.PrettyPrint was not intended for such things?
More information about the Haskell-Cafe
mailing list