
23 Sep
2005
23 Sep
'05
4:55 a.m.
| 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.
by definition, x <+> empty == x. what happens here is related to precedences: Text.PrettyPrint.HughesPJ> text "foo" <+> empty <> text "bar" foobar Text.PrettyPrint.HughesPJ> text "foo" <+> ( empty <> text "bar" ) foo bar best regards, -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- ---- http://www.imn.htwk-leipzig.de/~waldmann/ -------