[commit: ghc] wip/ghc-8.8-merges: Fix #14729 by making the normaliser homogeneous (a53b2f4)
git at git.haskell.org
git at git.haskell.org
Thu Feb 21 15:10:59 UTC 2019
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/ghc-8.8-merges
Link : http://ghc.haskell.org/trac/ghc/changeset/a53b2f45bd1c73a43b4df938790b177bc1ebf80d/ghc
>---------------------------------------------------------------
commit a53b2f45bd1c73a43b4df938790b177bc1ebf80d
Author: Richard Eisenberg <rae at cs.brynmawr.edu>
Date: Thu Jan 24 10:22:58 2019 -0500
Fix #14729 by making the normaliser homogeneous
This ports the fix to #12919 to the normaliser. (#12919 was about
the flattener.) Because the fix is involved, this is done by
moving the critical piece of code to Coercion, and then calling
this from both the flattener and the normaliser.
The key bit is: simplifying type families in a type is always
a *homogeneous* operation. See #12919 for a discussion of why
this is the Right Way to simplify type families.
Also fixes #15549.
test case: dependent/should_compile/T14729{,kind}
typecheck/should_compile/T15549[ab]
(cherry picked from commit 2b90356d26b4699227816ad9424e766eccdb6c36)
>---------------------------------------------------------------
a53b2f45bd1c73a43b4df938790b177bc1ebf80d
compiler/deSugar/Check.hs | 8 +-
compiler/typecheck/TcFlatten.hs | 371 ++-----------------
compiler/types/Coercion.hs | 398 ++++++++++++++++++++-
compiler/types/FamInstEnv.hs | 133 +++++--
compiler/types/Type.hs | 6 +-
testsuite/tests/dependent/should_compile/T14729.hs | 15 +
.../tests/dependent/should_compile/T14729.stderr | 15 +
.../dependent/should_compile/T14729kind.script | 6 +
.../dependent/should_compile/T14729kind.stdout | 2 +
testsuite/tests/dependent/should_compile/all.T | 2 +
.../tests/typecheck/should_compile/T15549a.hs | 20 ++
.../tests/typecheck/should_compile/T15549b.hs | 29 ++
testsuite/tests/typecheck/should_compile/all.T | 2 +
13 files changed, 636 insertions(+), 371 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 a53b2f45bd1c73a43b4df938790b177bc1ebf80d
More information about the ghc-commits
mailing list