@[reducible, inline]
Equations
Instances For
@[inline]
def Lean.Compiler.LCNF.Internalize.InternalizeM.run' {pu : Purity} {α : Type} (x : InternalizeM pu α) (state : FVarSubst pu) (ctx : Context := { }) :
Equations
- x.run' state ctx = (ReaderT.run x ctx).run' state
Instances For
@[instance_reducible]
instance Lean.Compiler.LCNF.Internalize.instMonadFVarSubstInternalizeMTrue {pu : Purity} :
MonadFVarSubst (InternalizeM pu) pu true
The InternalizeM monad is a translator. It "translates" the free variables
in the input expressions and Code, into new fresh free variables in the
local context.
Equations
@[instance_reducible]
instance Lean.Compiler.LCNF.Internalize.instMonadFVarSubstStateInternalizeM {pu : Purity} :
MonadFVarSubstState (InternalizeM pu) pu
Equations
- Lean.Compiler.LCNF.Internalize.instMonadFVarSubstStateInternalizeM = { modifySubst := modify }
def Lean.Compiler.LCNF.Internalize.internalizeParam {pu : Purity} (p : Param pu) :
InternalizeM pu (Param pu)
Equations
- One or more equations did not get rendered due to their size.
Instances For
def Lean.Compiler.LCNF.Internalize.internalizeArg {pu : Purity} (arg : Arg pu) :
InternalizeM pu (Arg pu)
Equations
- One or more equations did not get rendered due to their size.
- Lean.Compiler.LCNF.Internalize.internalizeArg Lean.Compiler.LCNF.Arg.erased = pure Lean.Compiler.LCNF.Arg.erased
Instances For
def Lean.Compiler.LCNF.Internalize.internalizeArgs {pu : Purity} (args : Array (Arg pu)) :
InternalizeM pu (Array (Arg pu))
Equations
Instances For
def Lean.Compiler.LCNF.Internalize.internalizeLetDecl {pu : Purity} (decl : LetDecl pu) :
InternalizeM pu (LetDecl pu)
Equations
- One or more equations did not get rendered due to their size.
Instances For
partial def Lean.Compiler.LCNF.Internalize.internalizeFunDecl {pu : Purity} (decl : FunDecl pu) :
InternalizeM pu (FunDecl pu)
partial def Lean.Compiler.LCNF.Internalize.internalizeCode {pu : Purity} (code : Code pu) :
InternalizeM pu (Code pu)
def Lean.Compiler.LCNF.Internalize.internalizeCodeDecl {pu : Purity} (decl : CodeDecl pu) :
InternalizeM pu (CodeDecl pu)
Equations
- One or more equations did not get rendered due to their size.
Instances For
def Lean.Compiler.LCNF.Code.internalize {pu : Purity} (code : Code pu) (s : FVarSubst pu := ∅) (uniqueIdents : Bool := false) :
Refresh free variables ids in code, and store their declarations in the local context.
Equations
- code.internalize s uniqueIdents = (Lean.Compiler.LCNF.Internalize.internalizeCode code).run' s { uniqueIdents := uniqueIdents }
Instances For
Equations
- Lean.Compiler.LCNF.normalizeFVarIds decl = do let ngenSaved ← Lean.getNGen Lean.setNGen { } tryFinally decl.internalize.run (Lean.setNGen ngenSaved)