@[reducible, inline]
abbrev Lean.Compiler.LCNF.Code.bind {m : Type → Type} {pu : Purity} [MonadCodeBind m] (c : Code pu) (f : FVarId → m (Code pu)) :
m (Code pu)
Return code that is equivalent to c >>= f. That is, executes c, and then f x, where
x is a variable that contains the result of c's computation.
If c contains a jump to a join point jp_i not declared in c, we throw an exception because
an invalid block would be generated. It would be invalid because f would not
be applied to jp_i. Note that, we could have decided to create a copy of jp_i where we apply f to it,
by we decided to not do it to avoid code duplication.
Equations
Instances For
@[instance_reducible]
Equations
- Lean.Compiler.LCNF.instMonadCodeBindCompilerM = { codeBind := fun {pu : Lean.Compiler.LCNF.Purity} => Lean.Compiler.LCNF.CompilerM.codeBind }
@[instance_reducible]
instance Lean.Compiler.LCNF.instMonadCodeBindReaderT {m : Type → Type} {ρ : Type} [MonadCodeBind m] :
MonadCodeBind (ReaderT ρ m)
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
instance Lean.Compiler.LCNF.instMonadCodeBindStateRefT'OfSTWorld {ω : Type} {m : Type → Type} {σ : Type} [STWorld ω m] [MonadCodeBind m] :
MonadCodeBind (StateRefT' ω σ m)
Equations
- One or more equations did not get rendered due to their size.
def Lean.Compiler.LCNF.isEtaExpandCandidateCore (type : Expr) (params : Array (Param Purity.pure)) :
Equations
- Lean.Compiler.LCNF.isEtaExpandCandidateCore type params = decide (Lean.Compiler.LCNF.getArrowArity type > params.size)
Instances For
@[reducible, inline]
Equations
- decl.isEtaExpandCandidate = Lean.Compiler.LCNF.isEtaExpandCandidateCore decl.type decl.params
Instances For
def Lean.Compiler.LCNF.etaExpandCore (type : Expr) (params : Array (Param Purity.pure)) (value : Code Purity.pure) :
Equations
- One or more equations did not get rendered due to their size.
Instances For
def Lean.Compiler.LCNF.etaExpandCore? (type : Expr) (params : Array (Param Purity.pure)) (value : Code Purity.pure) :
CompilerM (Option (Array (Param Purity.pure) × Code Purity.pure))
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.