ghc-tcplugin-api 0.18.2.0 → 0.18.2.1
raw patch · 3 files changed
+27/−5 lines, 3 filesdep ~basedep ~ghcPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, ghc
API changes (from Hackage documentation)
Files
- changelog.md +4/−0
- ghc-tcplugin-api.cabal +1/−1
- src/GHC/TcPlugin/API.hs +22/−4
changelog.md view
@@ -1,4 +1,8 @@ +# Version 0.18.2.1 (2026-04-28) + +- Add support for GHC 10.0. + # Version 0.18.2.0 (2025-01-14) - Add a new function `ctsSubst` which computes a fix-point substitution from
ghc-tcplugin-api.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: ghc-tcplugin-api -version: 0.18.2.0 +version: 0.18.2.1 synopsis: An API for type-checker plugins. license: BSD-3-Clause build-type: Simple
src/GHC/TcPlugin/API.hs view
@@ -766,10 +766,15 @@ ( TcType, TcLevel, MetaDetails, MetaInfo , isSkolemTyVar, isMetaTyVar , nonDetCmpType - , tyCoFVsOfTypes, mkTvSubst, extendTvSubst + , mkTvSubst, extendTvSubst , substTy, substTys, mkTvSubstPrs , tyCoVarsOfTypes , scopedSort +#if MIN_VERSION_ghc(9,15,0) + , tyCoVarsOfTypes +#else + , tyCoFVsOfTypes +#endif ) import GHC.Tc.Utils.TcMType ( isFilledMetaTyVar_maybe, writeMetaTyVar ) @@ -835,7 +840,11 @@ import GHC.Types.Var.Env ( InScopeSet, mkInScopeSet, mapVarEnv, elemVarEnv ) import GHC.Types.Var.Set - ( mkVarSet, unionVarSet ) + ( mkVarSet, unionVarSet +#if MIN_VERSION_ghc(9,15,0) + , nonDetVarSetElems +#endif + ) import GHC.Utils.Outputable ( Outputable(..), SDoc, text ) #if MIN_VERSION_ghc(9,2,0) @@ -867,8 +876,11 @@ import GHC.Utils.Misc ( HasDebugCallStack ) #endif +#if MIN_VERSION_ghc(9,15,0) +#else import GHC.Utils.FV ( fvVarList ) +#endif import GHC.Utils.Misc ( filterOut ) @@ -1052,8 +1064,14 @@ where tenv_subst = mkTvSubst in_scope tenv - range_fvs = tyCoFVsOfTypes (nonDetEltsUFM tenv) - range_tvs = fvVarList range_fvs + range_tvs :: [TyVar] + range_tvs = +#if MIN_VERSION_ghc(9,15,0) + nonDetVarSetElems $ tyCoVarsOfTypes +#else + fvVarList $ tyCoFVsOfTypes +#endif + $ nonDetEltsUFM tenv not_fixpoint = any in_domain range_tvs in_domain tv = tv `elemVarEnv` tenv