[commit: ghc] master: Refactor ConDecl: Trac #14529 (fa29df0)
git at git.haskell.org
git at git.haskell.org
Thu Dec 7 17:50:19 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/fa29df02a1b0b926afb2525a258172dcbf0ea460/ghc
>---------------------------------------------------------------
commit fa29df02a1b0b926afb2525a258172dcbf0ea460
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Tue Nov 28 11:33:37 2017 +0000
Refactor ConDecl: Trac #14529
This patch refactors HsDecls.ConDecl. Specifically
* ConDeclGADT was horrible, with all the information hidden
inside con_res_ty. Now it's kept separate, as it should be.
* ConDeclH98: use [LHsTyVarBndr] instead of LHsQTyVars for the
existentials. There is no implicit binding here.
* Add a field con_forall to both ConDeclGADT and ConDeclH98
which says if there is an explicit user-written forall.
* Field renamings in ConDecl
con_cxt to con_mb_cxt
con_details to con_args
There is an accompanying submodule update to Haddock.
Also the following change turned out to remove a lot of clutter:
* add a smart constructor for HsAppsTy, namely mkHsAppsTy,
and use it consistently. This avoids a lot of painful pattern
matching for the common singleton case.
Two api-annotation tests (T10278, and T10399) are broken, hence marking
them as expect_broken(14529). Alan is going to fix them, probably by
changing the con_forall field to
con_forall :: Maybe SrcSpan
instead of Bool
>---------------------------------------------------------------
fa29df02a1b0b926afb2525a258172dcbf0ea460
compiler/deSugar/DsMeta.hs | 119 ++++++++----------
compiler/hsSyn/Convert.hs | 56 ++++-----
compiler/hsSyn/HsDecls.hs | 140 +++++++++++++--------
compiler/hsSyn/HsTypes.hs | 45 +++----
compiler/hsSyn/HsUtils.hs | 90 ++++++-------
compiler/parser/Parser.y | 12 +-
compiler/parser/RdrHsSyn.hs | 70 +++++------
compiler/rename/RnNames.hs | 25 ++--
compiler/rename/RnSource.hs | 116 +++++++++++------
compiler/rename/RnTypes.hs | 95 +++++++-------
compiler/typecheck/TcHsType.hs | 6 +-
compiler/typecheck/TcTyClsDecls.hs | 137 +++++++++-----------
compiler/utils/ListSetOps.hs | 7 +-
testsuite/tests/ghc-api/annotations/all.T | 6 +-
.../parser/should_compile/DumpParsedAst.stderr | 60 ++++-----
.../parser/should_compile/DumpRenamedAst.stderr | 127 +++++++++----------
.../tests/parser/should_compile/T14189.stderr | 15 +--
testsuite/tests/patsyn/should_fail/T11039.stderr | 3 +-
testsuite/tests/patsyn/should_fail/T11667.stderr | 3 +-
testsuite/tests/rename/should_compile/T5331.stderr | 2 +-
testsuite/tests/th/T13123.hs | 2 +
.../tests/typecheck/should_compile/T2494.stderr | 12 +-
utils/haddock | 2 +-
utils/hsc2hs | 2 +-
24 files changed, 590 insertions(+), 562 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 fa29df02a1b0b926afb2525a258172dcbf0ea460
More information about the ghc-commits
mailing list