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

GHC ghc-devs at haskell.org
Mon Dec 14 15:19:41 UTC 2015


#10250: API Annotations : add Locations in hsSyn where layout occurs
-------------------------------------+-------------------------------------
        Reporter:  alanz             |                Owner:
            Type:  task              |               Status:  closed
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.10.1
      Resolution:  fixed             |             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
-------------------------------------+-------------------------------------
Changes (by bgamari):

 * status:  patch => closed
 * resolution:   => fixed


Old description:

> 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.

New description:

 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.

--

Comment:

 It seems this is done; Alan, feel free to reopen if necessary.

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


More information about the ghc-tickets mailing list