HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleghc-9.10.3GHC2021

GHC.Stg.Subst

  • 2 types
  • 8 values
  • Packageghc-9.10.3
  • Exports10
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceSubst.hs
datadata Subst
#

A renaming substitution from Ids to Ids. Like RnEnv2, but not maintaining pairs of substitutions. Like GHC.Core.Subst.Subst, but with the domain being Ids instead of entire CoreExpr.

valuesubstBndr :: Id -> Subst -> (Id, Subst)
#

Substitutes an Id for another one according to the Subst given in a way that avoids shadowing the InScopeSet, returning the result and an updated Subst that should be used by subsequent substitutions.

Substitutes an occurrence of an identifier for its counterpart recorded in the Subst. Does not generate a debug warning if the identifier to to substitute wasn't in scope.

valueextendSubst :: Id -> Id -> Subst -> Subst
#

Add a substitution for an Id to the Subst: you must ensure that the in-scope set is such that TyCoSubst Note [The substitution invariant] holds after extending the substitution like this.