Claus Reinke claus.reinke at talk21.com
Mon Apr 14 17:45:57 EDT 2008

>>  Does your pretty-printer round trip?
> Absolutely. I'd think a parser that can't parse what the
> pretty-printer yields means you either have a broken parser or a
> broken pretty-printer. :-)
> Except for line numbering (it inserts but doesn't read line pragmas),
> the AST should be preserved under f = parse . pretty.

and what about (pretty . parse) = id :: String -> String ?-)

preserving everything that isn't transformed at the AST level
would be a necessary starting point for refactoring larger
code bases. having easy access to comments and layout
information is where most frontends tend to let us down.

how much of the source is preserved by (pretty . parse)?


ps it is good to hear that src-ext is supported, follows
    language developments, and is separated from the 
    other parts of your projects!-)

More information about the Glasgow-haskell-users mailing list