[commit: ghc] master: Tidy up and refactor wildcard handling (9536481)
git at git.haskell.org
git at git.haskell.org
Wed Aug 5 15:50:10 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/953648127cea2836ec134b03a966695ac0b36434/ghc
>---------------------------------------------------------------
commit 953648127cea2836ec134b03a966695ac0b36434
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Aug 5 14:24:54 2015 +0100
Tidy up and refactor wildcard handling
When examining #10615, I found the wildcard handling hard
to understand. This patch refactors quite a bit, but with
no real change in behaviour.
* Split out TcIdSigInfo from TcSigInfo, as a separate type,
like TcPatSynInfo.
* Make TcIdSigInfo express more invariants by pushing the
wildard info into TcIdSigBndr
* Remove all special treatment of unification variables that arise
from wildcards; so the TauTv of TcType.MetaInfo loses its Bool
argument.
A ton of konck on changes. The result is significantly simpler, I think.
>---------------------------------------------------------------
953648127cea2836ec134b03a966695ac0b36434
compiler/typecheck/TcBinds.hs | 207 +++++++++++----------
compiler/typecheck/TcClassDcl.hs | 15 +-
compiler/typecheck/TcErrors.hs | 2 +-
compiler/typecheck/TcExpr.hs | 11 +-
compiler/typecheck/TcHsType.hs | 25 ++-
compiler/typecheck/TcInstDcls.hs | 21 ++-
compiler/typecheck/TcMType.hs | 60 +-----
compiler/typecheck/TcPat.hs | 128 +++++++------
compiler/typecheck/TcPatSyn.hs | 4 +-
compiler/typecheck/TcRnDriver.hs | 3 +-
compiler/typecheck/TcRnTypes.hs | 4 +-
compiler/typecheck/TcSMonad.hs | 2 +-
compiler/typecheck/TcType.hs | 36 ++--
compiler/typecheck/TcValidity.hs | 9 +-
compiler/types/Type.hs | 2 +-
compiler/types/TypeRep.hs | 21 +--
testsuite/tests/ghci/scripts/Defer02.stderr | 84 +++++----
.../should_compile/Defaulting2MROff.stderr | 2 +-
.../partial-sigs/should_compile/Either.stderr | 2 +-
.../partial-sigs/should_compile/EveryNamed.stderr | 2 +-
.../should_compile/ExtraConstraints3.stderr | 8 +-
.../partial-sigs/should_compile/ShowNamed.stderr | 2 +-
.../partial-sigs/should_compile/SimpleGen.stderr | 2 +-
.../partial-sigs/should_compile/SplicesUsed.stderr | 35 ++--
.../partial-sigs/should_compile/T10403.stderr | 9 +-
.../partial-sigs/should_compile/T10438.stderr | 15 +-
.../partial-sigs/should_compile/T10519.stderr | 3 +-
.../partial-sigs/should_compile/Uncurry.stderr | 2 +-
.../should_compile/UncurryNamed.stderr | 2 +-
.../WarningWildcardInstantiations.stderr | 60 +++---
.../should_fail/Defaulting1MROff.stderr | 6 +-
.../ExtraConstraintsWildcardNotEnabled.stderr | 5 +-
.../InstantiatedNamedWildcardsInConstraints.stderr | 6 +-
.../should_fail/NamedWildcardsEnabled.stderr | 6 +-
.../PartialTypeSignaturesDisabled.stderr | 6 +-
.../partial-sigs/should_fail/TidyClash.stderr | 20 +-
.../partial-sigs/should_fail/Trac10045.stderr | 3 +-
.../should_fail/WildcardInPatSynSig.stderr | 5 +-
.../should_fail/WildcardInstantiations.stderr | 56 +++---
.../WildcardsInPatternAndExprSig.stderr | 56 +++---
.../tests/typecheck/should_compile/T10072.stderr | 6 +-
.../tests/typecheck/should_fail/tcfail198.stderr | 14 +-
42 files changed, 497 insertions(+), 470 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 953648127cea2836ec134b03a966695ac0b36434
More information about the ghc-commits
mailing list