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
all. The idea of this is to support printing with HTML rendering:

wrap "<span class='keyword'>" (text "case") "</span>"

The HughesPJ library is 1000 lines long, so will be quite a lot of
work to change this to get it working properly. Is there a simpler
pretty printing library, with source code available somewhere? Ideally
using the same interface.

Of course, if anyone knows how to make this combinator using the
existing library, or using another existing library, I'd appreciate
it.

Thanks

Neil
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to