diff options
author | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2022-10-28 22:51:30 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-01 12:49:47 -0400 |
commit | 0560821f637fa2a4318fb068a969f4802acb5a89 (patch) | |
tree | 81f8e018b458c23f8c4003aaec3780665e617236 /compiler/GHC/Tc/Gen | |
parent | 30e625e6d4bdd15960edce8ecc40b85ce3d72b28 (diff) | |
download | haskell-0560821f637fa2a4318fb068a969f4802acb5a89.tar.gz |
Add accurate skolem info when quantifying
Ticket #22379 revealed that skolemiseQuantifiedTyVar was
dropping the passed-in skol_info on the floor when it encountered
a SkolemTv. Bad! Several TyCons thereby share a single SkolemInfo
on their binders, which lead to bogus error reports.
Diffstat (limited to 'compiler/GHC/Tc/Gen')
-rw-r--r-- | compiler/GHC/Tc/Gen/HsType.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Tc/Gen/HsType.hs b/compiler/GHC/Tc/Gen/HsType.hs index 77aa280af8..a664092221 100644 --- a/compiler/GHC/Tc/Gen/HsType.hs +++ b/compiler/GHC/Tc/Gen/HsType.hs @@ -3489,6 +3489,8 @@ bindTyClTyVars tycon_name thing_inside bindTyClTyVarsAndZonk :: Name -> ([TyConBinder] -> Kind -> TcM a) -> TcM a -- Like bindTyClTyVars, but in addition -- zonk the skolem TcTyVars of a PolyTcTyCon to TyVars +-- We always do this same zonking after a call to bindTyClTyVars, but +-- here we do it right away because there are no more unifications to come bindTyClTyVarsAndZonk tycon_name thing_inside = bindTyClTyVars tycon_name $ \ tc_bndrs tc_kind -> do { ze <- mkEmptyZonkEnv NoFlexi |