2009/5/22 Maurício <briqueabra...@yahoo.com>: >>> The new version of haddock makes use of GHC parser. How much >>> of effort would take to make haddock generate pretty-print >>> of the source code itself, (...) > >> (...) Is this what you want or is there some reason why you >> want the code to be pretty-printed? > > I usually have to resort to braces or bad indenting to get > code to parse, but I like to give it good presentation before > publishing. > > I used to pretty-print my code using haskell-src-exts with > great result, but that kills documentation.
I think the plan is to extend haskell-src-exts to retain comments. But if you want something that works now, you could use the GHC API. It has support for getting the token stream of a module, which contains the comments as tokens. Using Haddock to do this is not a good idea, better use the GHC API directly. David _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe