[GHC] #10250: API Annotations : add Locations in hsSyn where layout occurs

GHC ghc-devs at haskell.org
Fri Nov 13 06:38:57 UTC 2015


#10250: API Annotations : add Locations in hsSyn where layout occurs
-------------------------------------+-------------------------------------
        Reporter:  alanz             |                Owner:
            Type:  task              |               Status:  patch
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.10.1
      Resolution:                    |             Keywords:
                                     |  ApiAnnotations
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |  Phab:D815,Phab:D1370
-------------------------------------+-------------------------------------

Comment (by Alan Zimmerman <alan.zimm@…>):

 In [changeset:"2290c8bd8c3faee0cb7dc1c2c7951bb9d5e3ebf9/ghc" 2290c8b/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="2290c8bd8c3faee0cb7dc1c2c7951bb9d5e3ebf9"
 APIAnnotations:add Locations in hsSyn for layout

 Summary:
 At the moment ghc-exactprint, which uses the GHC API Annotations to
 provide a framework for roundtripping Haskell source code with optional
 AST edits, has to implement a horrible workaround to manage the points
 where layout needs to be captured.

 These are

     MatchGroup
     HsDo
     HsCmdDo
     HsLet
     LetStmt
     HsCmdLet
     GRHSs

 To provide a more natural representation, the contents subject to layout
 rules need to be wrapped in a SrcSpan.

 This commit does this.

 Trac ticket #10250

 Test Plan: ./validate

 Reviewers: hvr, goldfire, bgamari, austin, mpickering

 Reviewed By: mpickering

 Subscribers: thomie, mpickering

 Differential Revision: https://phabricator.haskell.org/D1370

 GHC Trac Issues: #10250
 }}}

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


More information about the ghc-tickets mailing list