[GHC] #9628: Add Annotations to the AST to simplify source to source conversions
GHC
ghc-devs at haskell.org
Fri Nov 21 19:24:42 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 |
-------------------------------------+-------------------------------------
Comment (by Austin Seipp <austin@…>):
In [changeset:"c0ad5bc03e02ce0d7d545599e4b1a68a6f727f2b/ghc"]:
{{{
#!CommitTicketReference repository="ghc"
revision="c0ad5bc03e02ce0d7d545599e4b1a68a6f727f2b"
Capture original source for literals
Summary:
Make HsLit and OverLitVal have original source strings, for source to
source conversions using the GHC API
This is part of the ongoing AST Annotations work, as captured in
https://ghc.haskell.org/trac/ghc/wiki/GhcAstAnnotations and
https://ghc.haskell.org/trac/ghc/ticket/9628#comment:28
The motivations for the literals is as follows
```lang=haskell
x,y :: Int
x = 0003
y = 0x04
s :: String
s = "\x20"
c :: Char
c = '\x20'
d :: Double
d = 0.00
blah = x
where
charH = '\x41'#
intH = 0004#
wordH = 005##
floatH = 3.20#
doubleH = 04.16##
x = 1
```
Test Plan: ./sh validate
Reviewers: simonpj, austin
Reviewed By: simonpj, austin
Subscribers: thomie, goldfire, carter, simonmar
Differential Revision: https://phabricator.haskell.org/D412
GHC Trac Issues: #9628
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9628#comment:42>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list