Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ghc-tcplugin-api.cabal
Original file line number Diff line number Diff line change
@@ -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
Expand Down
26 changes: 22 additions & 4 deletions src/GHC/TcPlugin/API.hs
Original file line number Diff line number Diff line change
Expand Up @@ -766,10 +766,15 @@ import GHC.Tc.Utils.TcType
( 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 )
Expand Down Expand Up @@ -835,7 +840,11 @@ import GHC.Types.Var
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)
Expand Down Expand Up @@ -867,8 +876,11 @@ import GHC.Unit.Types
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 )

Expand Down Expand Up @@ -1052,8 +1064,14 @@ niFixSubst in_scope tenv
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
Expand Down
Loading