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

GHC ghc-devs at haskell.org
Wed May 6 13:09:24 UTC 2015


#10250: API Annotations : add Locations in hsSyn were layout occurs
-------------------------------------+-------------------------------------
        Reporter:  alanz             |                   Owner:  alanz
            Type:  task              |                  Status:  patch
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |  ApiAnnotations
 Type of failure:  None/Unknown      |            Architecture:
      Blocked By:                    |  Unknown/Multiple
 Related Tickets:                    |               Test Case:
                                     |                Blocking:
                                     |  Differential Revisions:  Phab:D815
-------------------------------------+-------------------------------------

Comment (by Austin Seipp <austin@…>):

 In [changeset:"fb54b2c11cc7f2cfbafa35b6a1819d7443aa5494/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="fb54b2c11cc7f2cfbafa35b6a1819d7443aa5494"
 API Annotations : add Locations in hsSyn were layout occurs

 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

 Reviewed By: austin

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

 GHC Trac Issues: #10250
 }}}

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


More information about the ghc-tickets mailing list