diff options
author | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2023-03-06 10:50:47 +0000 |
---|---|---|
committer | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2023-03-21 14:48:54 +0000 |
commit | f0decae7121524790d5c907274bafac966839487 (patch) | |
tree | 96c712975be0ed889c0f3475c556981332da464a /hadrian/build-stack.bat | |
parent | 73d07c6e1986bd2b3516d4f009cc1e30ba804f06 (diff) | |
download | haskell-wip/T23051.tar.gz |
Be more careful about quantificationwip/T23051
This MR is driven by #23051. It does several things:
* It is guided by the generalisation plan described in #20686.
But it is still far from a complete implementation of that plan.
* Add Note [Inferred type with escaping kind] to GHC.Tc.Gen.Bind.
This explains that we don't (yet, pending #20686) directly
prevent generalising over escaping kinds.
* In `GHC.Tc.Utils.TcMType.defaultTyVar` we default RuntimeRep
and Multiplicity variables, beause we don't want to quantify over
them. We want to do the same for a Concrete tyvar, but there is
nothing sensible to default it to (unless it has kind RuntimeRep,
in which case it'll be caught by an earlier case). So we promote
instead.
* Pure refactoring in GHC.Tc.Solver:
* Rename decideMonoTyVars to decidePromotedTyVars, since that's
what it does.
* Move the actual promotion of the tyvars-to-promote from
`defaultTyVarsAndSimplify` to `decidePromotedTyVars`. This is a
no-op; just tidies up the code. E.g then we don't need to
return the promoted tyvars from `decidePromotedTyVars`.
* A little refactoring in `defaultTyVarsAndSimplify`, but no
change in behaviour.
* When making a TauTv unification variable into a ConcreteTv
(in GHC.Tc.Utils.Concrete.makeTypeConcrete), preserve the occ-name
of the type variable. This just improves error messages.
* Kill off dead code: GHC.Tc.Utils.TcMType.newConcreteHole
Diffstat (limited to 'hadrian/build-stack.bat')
0 files changed, 0 insertions, 0 deletions