[commit: ghc] ghc-8.2: Yet another attempt at inferring the right quantification (859dc65)
git at git.haskell.org
git at git.haskell.org
Mon Apr 10 23:30:59 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.2
Link : http://ghc.haskell.org/trac/ghc/changeset/859dc65369e8a9722514046246dd32b683c8b4a9/ghc
>---------------------------------------------------------------
commit 859dc65369e8a9722514046246dd32b683c8b4a9
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Apr 5 13:46:03 2017 +0100
Yet another attempt at inferring the right quantification
TcSimplify.decideQuantification is truly a tricky function!
Trac #13509 showed that we were being over-eager with defaulting
of runtime-rep variables (levity polymorphism), which meant that
a program was wrongly rejected, and with a very odd error message
(c.f. Trac #13530)
I spent an unreasonably long time figuring out how to fix this
in a decent way, and ended up with a major refactoring of
decideQuantification, with a kock-on effect in simplifyInfer.
It is at least a bit more comprehensible now; but I still
can't say I like it.
(cherry picked from commit bac95f9de5bd8d0a647a3a1e4492497603c2fda2)
>---------------------------------------------------------------
859dc65369e8a9722514046246dd32b683c8b4a9
compiler/typecheck/TcMType.hs | 95 +++----
compiler/typecheck/TcSimplify.hs | 306 ++++++++++++---------
.../indexed-types/should_fail/ExtraTcsUntch.stderr | 12 +-
testsuite/tests/typecheck/should_compile/T13509.hs | 17 ++
testsuite/tests/typecheck/should_compile/all.T | 3 +-
5 files changed, 255 insertions(+), 178 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 859dc65369e8a9722514046246dd32b683c8b4a9
More information about the ghc-commits
mailing list