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

#10250: API Annotations : add Locations in hsSyn were layout occurs -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: task | Status: new Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 Keywords: | Operating System: Unknown/Multiple ApiAnnotations | Type of failure: None/Unknown Architecture: | Blocked By: Unknown/Multiple | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10250 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10250: API Annotations : add Locations in hsSyn were layout occurs -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: task | Status: patch Priority: normal | Milestone: 7.10.2 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 -------------------------------------+------------------------------------- Changes (by alanz): * status: new => patch * differential: => Phab:D815 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10250#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 -------------------------------------+------------------------------------- Changes (by alanz): * milestone: 7.10.2 => 7.12.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10250#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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

#10250: API Annotations : add Locations in hsSyn were layout occurs -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: task | Status: closed Priority: normal | Milestone: 7.12.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 Revisions: Phab:D815 -------------------------------------+------------------------------------- Changes (by thomie): * status: patch => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10250#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10250: API Annotations : add Locations in hsSyn were layout occurs -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: task | Status: closed Priority: normal | Milestone: 7.12.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 Revisions: Phab:D815 -------------------------------------+------------------------------------- Comment (by alanz): Phab:D815 was never landed for this, the idea was to come back to it after 7.10.2 shipped. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10250#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10250: API Annotations : add Locations in hsSyn were layout occurs -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: task | Status: closed Priority: normal | Milestone: 7.12.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 Revisions: Phab:D815 -------------------------------------+------------------------------------- Comment (by thomie): Phab:D815 was landed on master already, so I'm confused by your message. If you're requesting for this to be merged to 7.10.3: just reopen, set the right milestone, and set it to status=merge. Otherwise it gets lost. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10250#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10250: API Annotations : add Locations in hsSyn were layout occurs -------------------------------------+------------------------------------- Reporter: alanz | Owner: Type: task | Status: new 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): Phab:D815 Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * owner: alanz => * status: closed => new * resolution: fixed => Comment: In commit 97d320f56b5848d6ba2c723c6e7f04f98e349a86: {{{ Author: Austin Seipp <> Date: Wed May 6 10:20:26 2015 -0500 Revert "API Annotations : add Locations in hsSyn were layout occurs" This reverts commit fb54b2c11cc7f2cfbafa35b6a1819d7443aa5494. As Alan pointed out, this will make cherry picking a lot harder until 7.10.2, so lets back it out until after the release. }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10250#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10250: API Annotations : add Locations in hsSyn were layout occurs -------------------------------------+------------------------------------- Reporter: alanz | Owner: Type: task | Status: new 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): Phab:D815 Wiki Page: | -------------------------------------+------------------------------------- Comment (by thomie): Ok, now I understand, it was reverted. Is this work still scheduled for ghc-8? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10250#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10250: API Annotations : add Locations in hsSyn were layout occurs -------------------------------------+------------------------------------- Reporter: alanz | Owner: Type: task | Status: new 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): Phab:D815 Wiki Page: | -------------------------------------+------------------------------------- Comment (by alanz): Yes, it will remove a wart in the round-tripping process, at the cost of requiring CPP in ghc-exactprint. At this stage, I think it worth doing, for all the future versions to come. @mpickering, do you agree? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10250#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10250: API Annotations : add Locations in hsSyn were layout occurs -------------------------------------+------------------------------------- Reporter: alanz | Owner: Type: task | Status: new 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 -------------------------------------+------------------------------------- Changes (by alanz): * differential: Phab:D815 => Phab:D815,Phab:D1370 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10250#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10250: API Annotations : add Locations in hsSyn were 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 -------------------------------------+------------------------------------- Changes (by alanz): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10250#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 -------------------------------------+------------------------------------- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10250#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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

#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
participants (1)
-
GHC