ghc-8.11.0.20200524: The GHC API
Safe HaskellNone
LanguageHaskell2010

GHC.Unit.Subst

Description

Module hole substitutions

Synopsis

Documentation

type ShHoleSubst = ModuleNameEnv Module Source #

Substitution on module variables, mapping module names to module identifiers.

renameHoleUnit :: PackageState -> ShHoleSubst -> Unit -> Unit Source #

Substitutes holes in a Unit, suitable for renaming when an include occurs; see Note [Representation of module/name variable].

p[A=A] maps to p[A=B] with A=B.

renameHoleModule :: PackageState -> ShHoleSubst -> Module -> Module Source #

Substitutes holes in a GenModule. NOT suitable for being called directly on a nameModule, see Note [Representation of module/name variable]. p[A=A]:B maps to p[A=q():A]:B with A=q():A; similarly, A maps to q():A.

renameHoleUnit' :: UnitInfoMap -> ShHoleSubst -> Unit -> Unit Source #

Like 'renameHoleUnit, but requires only UnitInfoMap so it can be used by Packages.

renameHoleModule' :: UnitInfoMap -> ShHoleSubst -> Module -> Module Source #

Like renameHoleModule, but requires only UnitInfoMap so it can be used by Packages.