Unexpected behaviour in Text.PrettyPrint.HughesPJ
simonpj at microsoft.com
Fri Sep 23 04:50:52 EDT 2005
That does seem like a bug to me.
I would love it if someone else could dig into the library and fix it.... it's years since I looked at it. Probably there are many things that could be improved. I have no ego investment in it, so it's 100% open to improvement.
| -----Original Message-----
| From: libraries-bounces at haskell.org [mailto:libraries-bounces at haskell.org] On Behalf Of Anders
| Sent: 22 September 2005 07:42
| To: Haskell libraries
| Subject: Unexpected behaviour in Text.PrettyPrint.HughesPJ
| I've been using the pretty printer in Text.PrettyPrint.HughesPJ lately,
| and I've encountered a behaviour that was very unexpected for me. If I
| define this small example:
| test = text "foo" <+> empty <> text "bar"
| Running 'show test' now gives the string "foobar" as a result (whereas I
| expected "foo bar").It seems the empty "eats" the space that I expect
| <+> to give me.
| So is this how the library is supposed to work or have I encountered a
| Libraries mailing list
| Libraries at haskell.org
More information about the Libraries