On Tuesday 23 September 2003 16.05, Luc Taesch wrote:
are there any facility to pretty print an haskell program ? im aware of HPJ combinators library, but i was looking for a command line utility, rather.. am i missing an entry in HPJ ?
thanks Luc _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
Hi, In GHC (and HUGS?) you can use the 'haskell-src' package which contains functions for parsing and pretty-printing haskell code. Using these, it only takes a couple of lines to make your own command line, pretty-printer for haskell code. If you want to, you can use my implementation which I attach to this mail. The problem with the parser, however, is that it doesn't handle comments at all. Regards Per