[commit: ghc] wip/embelleshed-rdr: Add HsEmbellished type to hsSyn (43a082b)
git at git.haskell.org
git at git.haskell.org
Sat Feb 18 20:28:21 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/embelleshed-rdr
Link : http://ghc.haskell.org/trac/ghc/changeset/43a082bb59310d10d3c7550d5cbeaab384ca4c76/ghc
>---------------------------------------------------------------
commit 43a082bb59310d10d3c7550d5cbeaab384ca4c76
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date: Fri Feb 17 12:13:14 2017 +0200
Add HsEmbellished type to hsSyn
Summary:
A RdrName can be parsed with parens or backquotes if it is used prefix or infix
respectively when it is normally not used that way.
This is not captured in hsSyn, and must be inferred from the occName when pretty
printing, or using the API annotations.
Introduce a wrapper type around the name to capture this
data Embellished name
= EName name
| EParens (Located name)
| EBackquotes (Located name)
So that we now have
data HsExpr id
= HsVar (LEmbellished id) -- ^ Variable
and in the other relevant points in hsSyn.
Test Plan: ./validate
Reviewers: bgamari, austin, goldfire
Subscribers: goldfire, thomie, mpickering, snowleopard
Differential Revision: https://phabricator.haskell.org/D3145
>---------------------------------------------------------------
43a082bb59310d10d3c7550d5cbeaab384ca4c76
compiler/deSugar/Check.hs | 4 +-
compiler/deSugar/Coverage.hs | 2 +-
compiler/deSugar/Desugar.hs | 4 +-
compiler/deSugar/DsArrows.hs | 2 +-
compiler/deSugar/DsExpr.hs | 2 +-
compiler/deSugar/DsGRHSs.hs | 4 +-
compiler/deSugar/DsMeta.hs | 96 ++++-----
compiler/deSugar/DsUtils.hs | 2 +-
compiler/deSugar/Match.hs | 2 +-
compiler/deSugar/PmExpr.hs | 2 +-
compiler/ghc.cabal.in | 1 +
compiler/ghc.mk | 1 +
compiler/hsSyn/Convert.hs | 82 ++++----
compiler/hsSyn/HsBinds.hs | 23 ++-
compiler/hsSyn/HsDecls.hs | 35 ++--
compiler/hsSyn/HsEmbellished.hs | 63 ++++++
compiler/hsSyn/HsExpr.hs | 14 +-
compiler/hsSyn/HsPat.hs | 5 +-
compiler/hsSyn/HsSyn.hs | 2 +
compiler/hsSyn/HsTypes.hs | 28 +--
compiler/hsSyn/HsUtils.hs | 54 ++---
compiler/main/HscMain.hs | 2 +-
compiler/main/InteractiveEval.hs | 5 +-
compiler/parser/ApiAnnotation.hs | 1 -
compiler/parser/Parser.y | 220 ++++++++++-----------
compiler/parser/RdrHsSyn.hs | 92 +++++----
compiler/rename/RnBinds.hs | 69 +++----
compiler/rename/RnEnv.hs | 36 +++-
compiler/rename/RnExpr.hs | 28 +--
compiler/rename/RnNames.hs | 30 +--
compiler/rename/RnPat.hs | 45 +++--
compiler/rename/RnSource.hs | 66 ++++---
compiler/rename/RnSplice.hs | 8 +-
compiler/rename/RnTypes.hs | 17 +-
compiler/typecheck/Inst.hs | 6 +-
compiler/typecheck/TcAnnotations.hs | 3 +-
compiler/typecheck/TcBinds.hs | 31 +--
compiler/typecheck/TcClassDcl.hs | 10 +-
compiler/typecheck/TcEnv.hs | 8 +-
compiler/typecheck/TcErrors.hs | 3 +-
compiler/typecheck/TcExpr.hs | 76 +++----
compiler/typecheck/TcGenDeriv.hs | 12 +-
compiler/typecheck/TcHsSyn.hs | 22 +--
compiler/typecheck/TcHsType.hs | 2 +-
compiler/typecheck/TcInstDcls.hs | 4 +-
compiler/typecheck/TcPat.hs | 11 +-
compiler/typecheck/TcPatSyn.hs | 33 ++--
compiler/typecheck/TcRnDriver.hs | 2 +-
compiler/typecheck/TcRnTypes.hs | 5 +-
compiler/typecheck/TcSigs.hs | 34 ++--
compiler/typecheck/TcSplice.hs | 2 +-
compiler/typecheck/TcTyClsDecls.hs | 28 +--
compiler/typecheck/TcTyDecls.hs | 16 +-
ghc/GHCi/UI/Info.hs | 2 +-
testsuite/tests/ghc-api/annotations/T10357.stdout | 2 -
testsuite/tests/ghc-api/annotations/T11321.stdout | 1 -
testsuite/tests/ghc-api/annotations/T13163.stdout | 7 -
testsuite/tests/ghc-api/landmines/landmines.stdout | 2 +-
.../tests/parser/should_compile/DumpParsedAst.hs | 4 +
.../parser/should_compile/DumpParsedAst.stderr | 160 +++++++++++++--
.../parser/should_compile/DumpRenamedAst.stderr | 36 ++--
.../should_compile/DumpTypecheckedAst.stderr | 32 +--
testsuite/tests/quasiquotation/T7918.hs | 4 +-
utils/ghctags/Main.hs | 6 +-
utils/haddock | 2 +-
65 files changed, 963 insertions(+), 650 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 43a082bb59310d10d3c7550d5cbeaab384ca4c76
More information about the ghc-commits
mailing list