<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV>I am sorry, I might have confused you. It appears that we have just a function for doing what you want; in UU.Pretty.Basic there is a  function "invisible". From the manual page I quote:</DIV><DIV><DIV><P><FONT class="Apple-style-span" color="#FF1D16">invisible ppd</FONT></P><P><FONT class="Apple-style-span" color="#FF1D16">Makes the formatted element invisible (all its attributes are forgotten in order to always succeed, even if there is no space left!)</FONT></P></DIV></DIV><P><FONT class="Apple-style-span" color="#FF1D16">In exceptional cases we want to escape to the page width limit, for example when you want to generate additional tags for markup languages such as LaTeX or HTML:</FONT></P><DIV><FONT class="Apple-style-span" color="#FF1D16">&gt; res_word rw = invisible (pp "{\\bf ") &gt;|&lt; rw &gt;|&lt; invisible (pp "}")</FONT></DIV><P><FONT class="Apple-style-span" color="#FF1D16">and try render (res_word "let") 3.</FONT></P><P><FONT class="Apple-style-span" color="#000000"><BR class="khtml-block-placeholder"></FONT></P><P><FONT class="Apple-style-span" color="#000000"> Doaitse</FONT></P><P><FONT class="Apple-style-span" color="#FF1D16"><BR class="khtml-block-placeholder"></FONT></P><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>On Dec 14, 2006, at 9:57 AM, Christian Maeder wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV>Doaitse Swierstra schrieb:</DIV> <BLOCKQUOTE type="cite"><DIV>The Prettyprint library you can download from:</DIV><DIV><BR></DIV><DIV><A href="http://www.cs.uu.nl/wiki/HUT/Download">http://www.cs.uu.nl/wiki/HUT/Download</A></DIV> </BLOCKQUOTE><DIV><BR></DIV><DIV>I've looked into your module UU.Pretty.Basic starting with:</DIV><DIV><BR></DIV><DIV>--  $Header: /data/cvs-rep/uust/lib/pretty/UU/Pretty/Basic.hs,v 1.2</DIV><DIV>2003/02/26 11:18:27 uust Exp $</DIV><DIV><BR></DIV><DIV>And I did not find the type Doc that you describe below.</DIV><DIV><BR></DIV><DIV>Christian</DIV><DIV><BR></DIV> <BLOCKQUOTE type="cite"><DIV>and is described on:</DIV><DIV><BR></DIV><DIV><A href="http://www.cs.uu.nl/wiki/HUT/PrettyPrintingCombinators">http://www.cs.uu.nl/wiki/HUT/PrettyPrintingCombinators</A></DIV><DIV><BR></DIV><DIV>contains amongst others the following code:</DIV><DIV><BR></DIV><DIV>data Doc        = Empty</DIV><DIV>                | Char Char             -- invariant: char is not '\n'</DIV><DIV>                | Text !Int String      -- invariant: text doesn't</DIV><DIV>contain '\n'</DIV><DIV>                | Line !Bool            -- True &lt;=&gt; when undone by</DIV><DIV>group, do not insert a space</DIV><DIV>                | Cat Doc Doc</DIV><DIV>                | Nest !Int Doc</DIV><DIV>                | Union Doc Doc         -- invariant: first lines of</DIV><DIV>first doc longer than the first lines of the second doc</DIV><DIV>                | Column  (Int -&gt; Doc)</DIV><DIV>                | Nesting (Int -&gt; Doc)</DIV><DIV><BR></DIV><DIV>text ""         = Empty</DIV><DIV>text s          = Text (length s) s</DIV><DIV><BR></DIV><DIV>so if you define now:</DIV><DIV><BR></DIV><DIV>wrap l t r = Text 0 l &lt;|&gt; text t &lt;|&gt; Text 0 r</DIV><DIV><BR></DIV><DIV>you should be set and done,</DIV><DIV><BR></DIV><DIV> Doaitse Swierstra</DIV> </BLOCKQUOTE><DIV><BR></DIV> </BLOCKQUOTE></DIV><BR></BODY></HTML>