#1886: GHC API should preserve and provide access to comments
---------------------------------------------------------------+------------
Reporter: claus |
Owner:
Type: bug |
Status: new
Priority: normal |
Milestone: 6.10 branch
Component: GHC API |
Version: 6.9
Severity: normal |
Resolution:
Keywords: GHC API, comments, program transformation, layout |
Difficulty: Unknown
Testcase: |
Architecture: Unknown
Os: Unknown |
---------------------------------------------------------------+------------
Comment (by Jedai):
My proposal is to support access to a special kind of token stream
including comments.
As the tokens themselves aren't enough to get back to the source that
produced them (some aesthetic details disappear), I also create a function
to add source strings to the tokens in a stream and a function to show
such a "rich" token stream.
HaRe use the following model :
get the AST and the token stream >>> modify AST &&& propagate changes to
token stream >>> second (pretty print the token stream).
While this model may not be as convenient as we could hope for, it works
and the guts of this process could eventually become a package on Hackage,
separate from HaRe.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1886#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs