[commit: ghc] wip/T9023: Fix egregious instantiation bug in matchOneConLike (fixing Trac #9023) (1fc4f6b)
git at git.haskell.org
git at git.haskell.org
Sun Jun 22 11:21:17 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T9023
Link : http://ghc.haskell.org/trac/ghc/changeset/1fc4f6b973a4fb14b2b15143b2774ec597b4da0f/ghc
>---------------------------------------------------------------
commit 1fc4f6b973a4fb14b2b15143b2774ec597b4da0f
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Thu Jun 5 11:03:45 2014 +0100
Fix egregious instantiation bug in matchOneConLike (fixing Trac #9023)
We simply weren't giving anything like the right instantiating types
to patSynInstArgTys in matchOneConLike.
To get these instantiating types would have involved matching the
result type of the pattern synonym with the pattern type, which is
tiresome. So instead I changed ConPatOut so that instead of recording
the type of the *whole* pattern (in old field pat_ty), it not records
the *instantiating* types (in new field pat_arg_tys). Then we canuse
TcHsSyn.conLikeResTy to get the pattern type when needed.
There are lots of knock-on incidental effects, but they mostly made
the code simpler, so I'm happy.
Conflicts:
compiler/typecheck/TcPat.lhs
>---------------------------------------------------------------
1fc4f6b973a4fb14b2b15143b2774ec597b4da0f
compiler/basicTypes/PatSyn.lhs | 25 +++++++++++++++++++++++--
compiler/deSugar/Check.lhs | 32 +++++++++++++++-----------------
compiler/deSugar/DsExpr.lhs | 2 +-
compiler/deSugar/DsUtils.lhs | 3 +--
compiler/deSugar/Match.lhs | 11 +++++------
compiler/deSugar/MatchCon.lhs | 33 +++++++++++++++------------------
compiler/deSugar/MatchLit.lhs | 6 +++---
compiler/hsSyn/Convert.lhs | 4 ++--
compiler/hsSyn/HsPat.lhs | 31 ++++++++++++++++++++-----------
compiler/hsSyn/HsUtils.lhs | 2 +-
compiler/parser/RdrHsSyn.lhs | 2 +-
compiler/rename/RnPat.lhs | 2 +-
compiler/typecheck/TcHsSyn.lhs | 24 ++++++++++++++++--------
compiler/typecheck/TcPat.lhs | 19 ++++++++++---------
14 files changed, 114 insertions(+), 82 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 1fc4f6b973a4fb14b2b15143b2774ec597b4da0f
More information about the ghc-commits
mailing list