[Git][ghc/ghc][wip/T18126] 2 commits: Improve kind generalisation, error messages
Simon Peyton Jones
gitlab at gitlab.haskell.org
Tue Sep 22 11:06:18 UTC 2020
Simon Peyton Jones pushed to branch wip/T18126 at Glasgow Haskell Compiler / GHC
Commits:
bff82032 by Simon Peyton Jones at 2020-09-22T11:57:36+01:00
Improve kind generalisation, error messages
This patch does two things:
* It refactors GHC.Tc.Errors a bit. In debugging Quick Look I was
forced to look in detail at error messages, and ended up doing a bit
of refactoring, esp in mkTyVarEqErr'. It's still quite a mess, but
a bit better, I think.
* It makes a significant improvement to the kind checking of type and
class declarations. Specifically, we now ensure that if kind
checking fails with an unsolved constraint, all the skolems are in
scope. That wasn't the case before, which led to some obscure error
messages; and occasional failures with "no skolem info" (eg #16245).
Both of these, and the main Quick Look patch itself, affect a /lot/ of
error messages, as you can see from the number of files changed. I've
checked them all; I think they are as good or better than before.
Smaller things
* I documented the various instances of VarBndr better.
See Note [The VarBndr tyep and its uses] in GHC.Types.Var
* Renamed GHC.Tc.Solver.simpl_top to simplifyTopWanteds
* A bit of refactoring in bindExplicitTKTele, to avoid the
footwork with Either. Simpler now.
* Move promoteTyVar from GHC.Tc.Solver to GHC.Tc.Utils.TcMType
Fixes #16245 (comment 211369), memorialised as
typecheck/polykinds/T16245a
Also fixes the three bugs in #18640
- - - - -
5917ddba by Ben Gamari at 2020-09-22T11:57:36+01:00
Use UniqSet for FieldLabelString instead of Data.Set
FieldLabelString, which is a FastString, no longer has an Ord instance.
- - - - -
30 changed files:
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Hole.hs
- compiler/GHC/Tc/Gen/Default.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Gen/Sig.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/Types/Constraint.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Tc/Utils/TcMType.hs
- compiler/GHC/Types/Var.hs
- docs/users_guide/9.0.1-notes.rst
- docs/users_guide/exts/explicit_forall.rst
- docs/users_guide/exts/instances.rst
- docs/users_guide/ghci.rst
- testsuite/tests/dependent/should_fail/RAE_T32a.stderr
- testsuite/tests/dependent/should_fail/T11407.stderr
- testsuite/tests/dependent/should_fail/T13780a.stderr
- testsuite/tests/dependent/should_fail/T14066e.stderr
- testsuite/tests/dependent/should_fail/T15859.hs
- testsuite/tests/dependent/should_fail/T15859.stderr
- + testsuite/tests/dependent/should_fail/T15859a.hs
- + testsuite/tests/dependent/should_fail/T15859a.stderr
- testsuite/tests/dependent/should_fail/T16344a.stderr
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a0d5573a342896f52ef859fb5c655165b09b5242...5917ddbaa257e7a47a95e37c73f3e6a730aa01bd
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a0d5573a342896f52ef859fb5c655165b09b5242...5917ddbaa257e7a47a95e37c73f3e6a730aa01bd
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200922/5c7d5733/attachment.html>
More information about the ghc-commits
mailing list