[GHC] #9628: Add Annotations to the AST to simplify source to source conversions
GHC
ghc-devs at haskell.org
Thu Oct 9 15:35:31 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 |
-------------------------------------+-------------------------------------
Changes (by alanz):
* differential: D246 => D297
* version: 7.8.3 => 7.9
Old description:
> Two different kinds of annotation are proposed to be added to HsSyn
>
> 1. Additional elements to explictly track the location of all syntactic
> elements not currently tracked. In particular, locations of reserved
> words and punctuation.
>
> 2. A top-level type parameter that allows a tool-writer to thread an
> application-specific annotation through the syntax tree.
>
> These two could potentially be merged, if the default annotation
> parameter is capable of tracking the first category of information.
>
> Discussion of the feature is at GhcAstAnnotations
New description:
Add Annotations to HsSyn to explicitly track the locations of all non-
blank source code elements to allow tools to parse a Haskell file, modify
the AST and then produce an updated version of the source preserving the
layout for unchanged parts.
Discussion of the feature is at GhcAstAnnotations
Note: an early effort was at Phab:D297, but this was abandoned as
unworkable.
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9628#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list