Text.PrettyPrint.HughesPJ inserting blank lines

Tomasz Zielonka tomasz.zielonka at gmail.com
Thu Jan 27 13:28:06 EST 2005


On Wed, Jan 26, 2005 at 07:51:27PM +0100, Christian Maeder wrote:
> I've found myself using "$+$ space $+$" in order to insert a blank line 
> between two docs.
> 
> There are probably other ways to do it. "(test "")" (and $$) instead of 
> "space" (or $+$) also work in many cases (but not "empty"). Which way 
> would be the best?
> 
> Maybe one could add a further function "$++$" to do this and a list 
> version "vsep" of "$++$"?
> 
> Another idea might be something like a vertical space "vspace" so that 
> several blank lines would be created by: $$ vspace $$ vspace $$ ...

This is ugly:

    x $++$ y = (x <> text "") $+$ text "" $+$ (text "" <> y)

However, I don't know if it's OK that (show (empty $++$ empty) ==
"\n\n").

Best regards,
Tomasz


More information about the Libraries mailing list