diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2020-11-25 11:33:11 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-12-19 02:14:07 -0500 |
commit | c2430398481f5aab12fd94e6549c7b9bbd1e43fe (patch) | |
tree | 02abc39374f93b9e8d84b764ac4f7174e09b9588 /compiler/GHC/Tc/Solver/Rewrite.hs | |
parent | 59a07641090eec9dcaf5af97026b94911ca3191c (diff) | |
download | haskell-c2430398481f5aab12fd94e6549c7b9bbd1e43fe.tar.gz |
Quick Look: zonk result type
Provoked by #18987, this patch adds a missing zonkQuickLook of
app_res_rho in tcApp.
Most of the time this zonk is unnecesary. In fact, I can't think of a
concrete case where it is needed -- hence no test. But even if it
isn't necessary, the reasoning that allows it to be omitted is very
subtle. So I've put it in.
However, adding this zonk does /not/ affect the emitted constraints,
so the reported symptoms for #18987 remain, but harmlessly so, and now
documented in a new Note [Instantiation variables are short lived]
in GHC.Tc.Gen.App.
No change in behaviour, no tests.
Diffstat (limited to 'compiler/GHC/Tc/Solver/Rewrite.hs')
-rw-r--r-- | compiler/GHC/Tc/Solver/Rewrite.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/GHC/Tc/Solver/Rewrite.hs b/compiler/GHC/Tc/Solver/Rewrite.hs index 7e4993ad8d..42a00d73ba 100644 --- a/compiler/GHC/Tc/Solver/Rewrite.hs +++ b/compiler/GHC/Tc/Solver/Rewrite.hs @@ -897,6 +897,11 @@ data RewriteTvResult -- ^ The tyvar rewrites to a not-necessarily rewritten other type. -- co :: new type ~r old type, where the role is determined by -- the RewriteEnv + -- + -- With Quick Look, the returned TcType can be a polytype; + -- that is, in the constraint solver, a unification variable + -- can contain a polytype. See GHC.Tc.Gen.App + -- Note [Instantiation variables are short lived] rewriteTyVar :: TyVar -> RewriteM (Xi, Coercion) rewriteTyVar tv |