[Haskell-cafe] Request for a Simple Pretty Printing library

2006-12-13 Thread Neil Mitchell
Hi, I've been using the HughesPJ pretty printing library, but I need a new combinator: wrap :: String - Doc - String - Doc wrap prepend doc append = ... The semantics of this would be that the text is prepended and appended to the doc when rendered, but does not alter the pretty printing at

Re: [Haskell-cafe] Request for a Simple Pretty Printing library

2006-12-13 Thread Tomasz Zielonka
On Wed, Dec 13, 2006 at 08:58:25PM +, Neil Mitchell wrote: I've been using the HughesPJ pretty printing library, but I need a new combinator: wrap :: String - Doc - String - Doc wrap prepend doc append = ... The semantics of this would be that the text is prepended and appended to

Re: [Haskell-cafe] Request for a Simple Pretty Printing library

2006-12-13 Thread Doaitse Swierstra
The Prettyprint library you can download from: http://www.cs.uu.nl/wiki/HUT/Download and is described on: http://www.cs.uu.nl/wiki/HUT/PrettyPrintingCombinators contains amongst others the following code: data Doc= Empty | Char Char -- invariant: char is

Re: [Haskell-cafe] Request for a Simple Pretty Printing library

2006-12-13 Thread Neil Mitchell
Hi Something like: wrap prepend doc append = zeroText prepend doc zeroText append zeroText s = textBeside_ (Str s) 0 Empty Thanks, that works great! Is there likely to be any support for adding this to the standard library? I'd rather not have to fork a version of HughesPJ to get this

Re: [Haskell-cafe] Request for a Simple Pretty Printing library

2006-12-13 Thread Donald Bruce Stewart
doaitse: The Prettyprint library you can download from: http://www.cs.uu.nl/wiki/HUT/Download I've added uulib to the libraries page: http://haskell.org/haskellwiki/Libraries_and_tools/Compiler_tools#Pretty_printing But this makes me wonder: how many other top secret utrecht