[commit: ghc] master: Work SourceText in for all integer literals (3a1babd)
git at git.haskell.org
git at git.haskell.org
Sat Jan 16 13:52:54 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/3a1babd6243edd96073ed3e3a5fb6e0aaf11350e/ghc
>---------------------------------------------------------------
commit 3a1babd6243edd96073ed3e3a5fb6e0aaf11350e
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date: Fri Jan 15 00:03:58 2016 +0200
Work SourceText in for all integer literals
Summary:
Certain syntactic elements have integers in them, such as fixity
specifications, SPECIALISE pragmas and so on.
The lexer will accept mult-radix literals, with arbitrary leading zeros
in these.
Bring in a SourceText field to each affected AST element to capture the
original literal text for use with API Annotations.
Affected hsSyn elements are
```
-- See note [Pragma source text]
data Activation = NeverActive
| AlwaysActive
| ActiveBefore SourceText PhaseNum
-- Active only *strictly before* this phase
| ActiveAfter SourceText PhaseNum
-- Active in this phase and later
deriving( Eq, Data, Typeable )
-- Eq used in comparing rules in HsDecls
data Fixity = Fixity SourceText Int FixityDirection
-- Note [Pragma source text]
deriving (Data, Typeable)
```
and
```
| HsTickPragma -- A pragma introduced tick
SourceText -- Note [Pragma source text] in BasicTypes
(StringLiteral,(Int,Int),(Int,Int))
-- external span for this tick
((SourceText,SourceText),(SourceText,SourceText))
-- Source text for the four integers used in the span.
-- See note [Pragma source text] in BasicTypes
(LHsExpr id)
```
Updates haddock submodule
Test Plan: ./validate
Reviewers: goldfire, bgamari, austin
Reviewed By: bgamari
Subscribers: thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D1781
GHC Trac Issues: #11430
>---------------------------------------------------------------
3a1babd6243edd96073ed3e3a5fb6e0aaf11350e
compiler/basicTypes/BasicTypes.hs | 49 ++++++++++++----------
compiler/basicTypes/MkId.hs | 3 +-
compiler/deSugar/Coverage.hs | 2 +-
compiler/deSugar/DsExpr.hs | 2 +-
compiler/deSugar/DsMeta.hs | 12 +++---
compiler/deSugar/PmExpr.hs | 2 +-
compiler/hsSyn/Convert.hs | 6 +--
compiler/hsSyn/HsExpr.hs | 5 ++-
compiler/iface/LoadIface.hs | 2 +-
compiler/parser/Parser.y | 33 +++++++++------
compiler/parser/RdrHsSyn.hs | 6 +--
compiler/rename/RnEnv.hs | 4 +-
compiler/rename/RnExpr.hs | 12 +++---
compiler/rename/RnTypes.hs | 8 ++--
compiler/simplCore/SimplUtils.hs | 4 +-
compiler/stranal/WorkWrap.hs | 2 +-
compiler/typecheck/TcExpr.hs | 4 +-
compiler/typecheck/TcGenDeriv.hs | 2 +-
compiler/typecheck/TcGenGenerics.hs | 6 +--
compiler/typecheck/TcHsSyn.hs | 4 +-
compiler/typecheck/TcRnTypes.hs | 2 +-
compiler/typecheck/TcSplice.hs | 2 +-
compiler/utils/Binary.hs | 22 ++++++----
testsuite/tests/ghc-api/annotations/Makefile | 7 ++++
testsuite/tests/ghc-api/annotations/T11430.stdout | 6 +++
testsuite/tests/ghc-api/annotations/Test11430.hs | 25 +++++++++++
testsuite/tests/ghc-api/annotations/all.T | 1 +
.../tests/ghc-api/annotations/stringSource.hs | 2 +-
.../annotations/{stringSource.hs => t11430.hs} | 47 +++++++--------------
utils/genprimopcode/Main.hs | 5 ++-
utils/genprimopcode/Parser.y | 6 +--
utils/genprimopcode/Syntax.hs | 4 +-
utils/haddock | 2 +-
33 files changed, 175 insertions(+), 124 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 3a1babd6243edd96073ed3e3a5fb6e0aaf11350e
More information about the ghc-commits
mailing list