[Haskell-cafe] Pretty Print, text or ++?

2008-08-15 Thread Paul Keir
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? Cheers, Paul ___

Re: [Haskell-cafe] Pretty Print, text or ++?

2008-08-15 Thread John Van Enk
Paul, Something tells me you might want to look at `concat': concat :: [[a]] - [a] /jve 2008/8/15 Paul Keir [EMAIL PROTECTED] 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

RE: [Haskell-cafe] Pretty Print, text or ++?

2008-08-15 Thread Paul Keir
@haskell.org Subject: Re: [Haskell-cafe] Pretty Print, text or ++? Paul, Something tells me you might want to look at `concat': concat :: [[a]] - [a] /jve 2008/8/15 Paul Keir [EMAIL PROTECTED] Hi there, I'm writing a pretty printer using the Text.PrettyPrint library, and there's

Re: [Haskell-cafe] Pretty Print, text or ++?

2008-08-15 Thread Malcolm Wallace
Paul Keir [EMAIL PROTECTED] wrote: text (a ++ b ++ c ++ d) The above is going to be ugly-printed onto a single line, whilst this: text a + text b + text c + text d has a chance to be pretty-printed onto several lines, if each component is individually long. It doesn't really matter which

Re: [Haskell-cafe] Pretty Print, text or ++?

2008-08-15 Thread John Van Enk
this not transform my pretty printing into ugly printing; when longer strings are used? Paul -Original Message- From: [EMAIL PROTECTED] on behalf of John Van Enk Sent: Fri 15/08/2008 14:31 To: Paul Keir Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Pretty Print, text