
15 Aug
2008
15 Aug
'08
9:50 a.m.
Paul Keir wrote:
Hi there,
I'm writing a pretty printer using the Text.PrettyPrint library, and there's a pattern I'm coming across quite often. Does anyone know whether,
text (a ++ b ++ c ++ d) or text a <+> text b <+> text c <+> text d
runs quicker?
Don't worry about speed. Write it as: hsep[text a, text b, text c, text d] and you can easily change hsep to sep or fsep, if the lines get too long. (And maybe you have some other docs that may be part of the list that are not constructed using "text".) HTH Christian