Moduleghc-9.10.3GHC2021
GHC.Stg.Subst
- 2 types
- 8 values
- Packageghc-9.10.3
- Exports10
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceSubst.hs
emptySubst = mkEmptySubst emptyInScopeSetConstructs a new Subst assuming the variables in the given InScopeSet are in scope.
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.
substBndrs = runState . traverse (state . substBndr)Substitutes an occurrence of an identifier for its counterpart recorded in the Subst.
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.
Add the Id to the in-scope set and remove any existing substitutions for it.