[GHC] #9628: Add Annotations to the AST to simplify source to source conversions

GHC ghc-devs at haskell.org
Mon Oct 20 07:55:46 UTC 2014


#9628: Add Annotations to the AST to simplify source to source conversions
-------------------------------------+-------------------------------------
              Reporter:  alanz       |            Owner:  alanz
                  Type:  feature     |           Status:  new
  request                            |        Milestone:
              Priority:  normal      |          Version:  7.9
             Component:  Compiler    |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:              |  Related Tickets:
  None/Unknown                       |
             Test Case:              |
              Blocking:              |
Differential Revisions:  D297        |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Well done for making progress.  Some thoughts

  * If the patch is ready for review, is [wiki:GhcAstAnnotations] also
 fully up to date?  Could you move any discussion of alternatives to the
 end, under "Other possible design alternatives" so that what remains is
 actually a description of the feature you propose, and a sketch of its
 implementation?  I'm unsure about which bits of the wiki page are rejected
 ideas and which are the ones you adopted.

  * Floating around is also `ExtraCommas`.  I think the two are somewhat
 orthogonal, right?

  * Does your design say where comments are?  That is, can you really
 round-trip source code?

  In particular, an excellent criterion could be: can you do Haddock this
 way?  Currently Haddock has a lot of Haddock-specific fields in HsSyn.
 Could they all be replaced with annotations in your style?  If not, what
 would take to make that possible?  It would be highly cool; after all,
 Haddock may be privileged, but the more we can make it possible for others
 to do Haddock-like things without changing GHC itself, the better.

  * You outlined a number of "customers" in an earlier post. Would it be
 worth adding them to the wiki page?

 Simon

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9628#comment:30>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list