[Git][ghc/ghc][master] Don't use substTyUnchecked in newMetaTyVar
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Sun Jul 16 13:21:16 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
eb1a6ab1 by sheaf at 2023-07-16T09:20:45-04:00
Don't use substTyUnchecked in newMetaTyVar
There were some comments that explained that we needed to use an
unchecked substitution function because of issue #12931, but that
has since been fixed, so we should be able to use substTy instead now.
- - - - -
1 changed file:
- compiler/GHC/Tc/Utils/TcMType.hs
Changes:
=====================================
compiler/GHC/Tc/Utils/TcMType.hs
=====================================
@@ -1001,16 +1001,7 @@ new_meta_tv_x info subst tv
; let subst1 = extendTvSubstWithClone subst tv new_tv
; return (subst1, new_tv) }
where
- substd_kind = substTyUnchecked subst (tyVarKind tv)
- -- NOTE: #12549 is fixed so we could use
- -- substTy here, but the tc_infer_args problem
- -- is not yet fixed so leaving as unchecked for now.
- -- OLD NOTE:
- -- Unchecked because we call newMetaTyVarX from
- -- tcInstTyBinder, which is called from tcInferTyApps
- -- which does not yet take enough trouble to ensure
- -- the in-scope set is right; e.g. #12785 trips
- -- if we use substTy here
+ substd_kind = substTy subst (tyVarKind tv)
newMetaTyVarTyAtLevel :: TcLevel -> TcKind -> TcM TcType
newMetaTyVarTyAtLevel tc_lvl kind
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eb1a6ab1df473c7ec0e1cbb20fc7124706326ce1
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eb1a6ab1df473c7ec0e1cbb20fc7124706326ce1
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/20230716/dd400ca9/attachment-0001.html>
More information about the ghc-commits
mailing list