2008/9/5 Chaddaï Fouché <[EMAIL PROTECTED]>:
> This patch add four exported functions to GHC.hs and one to Lexer.x,
> it allows one to extract a token stream from a source file. This token
> stream include comments which means it contains everything needed to
> recreate Haddock for example in a more independent fashion (the
> current one is completely interleaved with GHC and complicate a lot of
> code).
> In addition, three functions in GHC.hs work on a stream of pair of
> (Located Token, String), the second member corresponding to the source
> of the first, one function extract this from a file and another
> convert it back to a String virtually identical to the source file
> (except for insignificant whitespace). With this we can support the
> model used by HaRe : get the AST and the token stream, modify the AST,
> propagate the modifications to the token stream, pretty-print this
> token stream.
>
> Normally, this patch shouldn't interfere with anything in GHC (except
> that there will be some very small changes to make when the new API
> roll in).

Awesome! Thanks for doing this.

David

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to