invisible ppd
Makes the formatted element invisible (all its attributes are forgotten in order to always succeed, even if there is no space left!)
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:
and try render (res_word "let") 3.
Doaitse
Doaitse Swierstra schrieb:The Prettyprint library you can download from:I've looked into your module UU.Pretty.Basic starting with:-- $Header: /data/cvs-rep/uust/lib/pretty/UU/Pretty/Basic.hs,v 1.22003/02/26 11:18:27 uust Exp $And I did not find the type Doc that you describe below.Christianand is described on:contains amongst others the following code:data Doc = Empty| Char Char -- invariant: char is not '\n'| Text !Int String -- invariant: text doesn'tcontain '\n'| Line !Bool -- True <=> when undone bygroup, do not insert a space| Cat Doc Doc| Nest !Int Doc| Union Doc Doc -- invariant: first lines offirst doc longer than the first lines of the second doc| Column (Int -> Doc)| Nesting (Int -> Doc)text "" = Emptytext s = Text (length s) sso if you define now:wrap l t r = Text 0 l <|> text t <|> Text 0 ryou should be set and done,Doaitse Swierstra