[commit: ghc] ghc-8.0: Expand given superclasses more eagerly (0766668)
git at git.haskell.org
git at git.haskell.org
Fri Aug 26 14:01:59 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/0766668a10c700f463b192ce91ac44d3c48147f1/ghc
>---------------------------------------------------------------
commit 0766668a10c700f463b192ce91ac44d3c48147f1
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Jun 22 14:17:58 2016 +0100
Expand given superclasses more eagerly
This patch fixes Trac #12175, another delicate corner case of
Note [Instance and Given overlap] in TcInteract.
In #12175 we were not expanding given superclasses eagerly
enough. It was easy to fix, and is actually rather neater than
before.
See Note [Eagerly expand given superclasses] in TcCanonical.
The main change is to move the eager expansion of given superclasses
to canClassNC.
(cherry picked from commit ce97b7298d54bdfccd9dcf366a69c5617b4eb43f)
>---------------------------------------------------------------
0766668a10c700f463b192ce91ac44d3c48147f1
compiler/typecheck/TcCanonical.hs | 87 ++++++++++++++--------
compiler/typecheck/TcInteract.hs | 22 +++++-
compiler/typecheck/TcRnTypes.hs | 10 ++-
compiler/typecheck/TcSMonad.hs | 2 +-
compiler/typecheck/TcSimplify.hs | 12 +--
.../tests/indexed-types/should_compile/T12175.hs | 36 +++++++++
testsuite/tests/indexed-types/should_compile/all.T | 2 +-
7 files changed, 125 insertions(+), 46 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 0766668a10c700f463b192ce91ac44d3c48147f1
More information about the ghc-commits
mailing list