[commit: ghc] wip/api-annots-7.10-3: ApiAnnotations : strings in warnings do not return SourceText (d06ce03)
git at git.haskell.org
git at git.haskell.org
Mon Jun 1 16:19:50 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/api-annots-7.10-3
Link : http://ghc.haskell.org/trac/ghc/changeset/d06ce0317f38d4ea9f979208a73abf691aecee06/ghc
>---------------------------------------------------------------
commit d06ce0317f38d4ea9f979208a73abf691aecee06
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date: Mon Jun 1 14:16:41 2015 +0200
ApiAnnotations : strings in warnings do not return SourceText
Summary:
The strings used in a WARNING pragma are captured via
strings :: { Located ([AddAnn],[Located FastString]) }
: STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) }
..
The STRING token has a method getSTRINGs that returns the original
source text for a string.
A warning of the form
{-# WARNING Logic
, mkSolver
, mkSimpleSolver
, mkSolverForLogic
, solverSetParams
, solverPush
, solverPop
, solverReset
, solverGetNumScopes
, solverAssertCnstr
, solverAssertAndTrack
, solverCheck
, solverCheckAndGetModel
, solverGetReasonUnknown
"New Z3 API support is still incomplete and fragile: \
\you may experience segmentation faults!"
#-}
returns the concatenated warning string rather than the original source.
This patch now deals with all remaining instances of getSTRING to bring
in a SourceText for each.
This updates the haddock submodule as well, for the AST change.
Test Plan: ./validate
Reviewers: hvr, austin, goldfire
Reviewed By: austin
Subscribers: bgamari, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D907
GHC Trac Issues: #10313
(cherry picked from commit e6191d1cc37e98785af8b309100ea840084fa3ba)
Conflicts:
compiler/parser/Parser.y
compiler/typecheck/TcRules.hs
utils/haddock
>---------------------------------------------------------------
d06ce0317f38d4ea9f979208a73abf691aecee06
compiler/basicTypes/BasicTypes.hs | 14 +++--
compiler/codeGen/StgCmmForeign.hs | 4 +-
compiler/deSugar/Desugar.hs | 4 +-
compiler/deSugar/DsCCall.hs | 3 +-
compiler/deSugar/DsExpr.hs | 2 +-
compiler/deSugar/DsForeign.hs | 15 +++--
compiler/deSugar/DsMeta.hs | 12 ++--
compiler/ghci/ByteCodeGen.hs | 4 +-
compiler/hsSyn/Convert.hs | 5 +-
compiler/hsSyn/HsDecls.hs | 13 +++--
compiler/hsSyn/HsExpr.hs | 13 +++--
compiler/hsSyn/HsImpExp.hs | 6 +-
compiler/iface/MkIface.hs | 2 +-
compiler/main/DriverMkDepend.hs | 2 +-
compiler/main/GhcMake.hs | 3 +-
compiler/main/HscMain.hs | 2 +-
compiler/parser/Parser.y | 40 ++++++-------
compiler/parser/RdrHsSyn.hs | 19 +++---
compiler/prelude/ForeignCall.hs | 38 +++++++-----
compiler/prelude/TysWiredIn.hs | 22 +++----
compiler/rename/RnNames.hs | 8 +--
compiler/rename/RnSource.hs | 9 +--
compiler/stgSyn/CoreToStg.hs | 3 +-
compiler/typecheck/TcForeign.hs | 8 +--
compiler/typecheck/TcRules.hs | 10 ++--
ghc/InteractiveUI.hs | 7 ++-
testsuite/tests/ghc-api/annotations/.gitignore | 1 +
testsuite/tests/ghc-api/annotations/Makefile | 6 ++
testsuite/tests/ghc-api/annotations/T10313.stderr | 28 +++++++++
testsuite/tests/ghc-api/annotations/T10313.stdout | 27 +++++++++
testsuite/tests/ghc-api/annotations/Test10313.hs | 38 ++++++++++++
testsuite/tests/ghc-api/annotations/all.T | 1 +
.../annotations/{parseTree.hs => stringSource.hs} | 67 +++++++++++++++++-----
utils/haddock | 2 +-
34 files changed, 303 insertions(+), 135 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 d06ce0317f38d4ea9f979208a73abf691aecee06
More information about the ghc-commits
mailing list