File: .lake/packages/lean4/src/lean/Lean/Compiler/LCNF/Bind.lean

full_name: Lean.Compiler.LCNF.MonadCodeBind
code: /-- Helper class for lifting `CompilerM.codeBind` -/
class MonadCodeBind (m : Type → Type) where
  codeBind : (c : Code) → (f : FVarId → m Code) → m Code
goal: Type

full_name: Lean.Compiler.LCNF.MonadCodeBind.codeBind
code: /-- Helper class for lifting `CompilerM.codeBind` -/
class MonadCodeBind (m : Type → Type) where
  codeBind : (c : Code) → (f : FVarId → m Code) → m Code
goal: m Lean.Compiler.LCNF.Code

full_name: Lean.Compiler.LCNF.Code.bind
code: /--
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.
-/
abbrev Code.bind [MonadCodeBind m] (c : Code) (f : FVarId → m Code) : m Code 
goal: m Lean.Compiler.LCNF.Code

full_name: Lean.Compiler.LCNF.CompilerM.codeBind.go
code: partial def CompilerM.codeBind (c : Code) (f : FVarId → CompilerM Code) : CompilerM Code 
goal: ReaderT Lean.FVarIdSet Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.Code

full_name: Lean.Compiler.LCNF.CompilerM.codeBind
code: partial def CompilerM.codeBind (c : Code) (f : FVarId → CompilerM Code) : CompilerM Code 
goal: Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.Code

full_name: Lean.Compiler.LCNF.instMonadCodeBindCompilerM
code: instance : MonadCodeBind CompilerM 
goal: Lean.Compiler.LCNF.MonadCodeBind Lean.Compiler.LCNF.CompilerM

full_name: Lean.Compiler.LCNF.instMonadCodeBindReaderT
code: instance [MonadCodeBind m] : MonadCodeBind (ReaderT ρ m) 
goal: Lean.Compiler.LCNF.MonadCodeBind (ReaderT ρ m)

full_name: Lean.Compiler.LCNF.instMonadCodeBindStateRefT'OfSTWorld
code: instance [STWorld ω m] [MonadCodeBind m] : MonadCodeBind (StateRefT' ω σ m) 
goal: Lean.Compiler.LCNF.MonadCodeBind (StateRefT' ω σ m)

full_name: Lean.Compiler.LCNF.mkNewParams.go
code: /--
Create new parameters for the given arrow type.
Example: if `type` is `Nat → Bool → Int`, the result is
an array containing two new parameters with types `Nat` and `Bool`.
-/
partial def mkNewParams (type : Expr) : CompilerM (Array Param) 
goal: Lean.Compiler.LCNF.CompilerM (Array Lean.Compiler.LCNF.Param)

full_name: Lean.Compiler.LCNF.mkNewParams
code: /--
Create new parameters for the given arrow type.
Example: if `type` is `Nat → Bool → Int`, the result is
an array containing two new parameters with types `Nat` and `Bool`.
-/
partial def mkNewParams (type : Expr) : CompilerM (Array Param) 
goal: Lean.Compiler.LCNF.CompilerM (Array Lean.Compiler.LCNF.Param)

full_name: Lean.Compiler.LCNF.isEtaExpandCandidateCore
code: def isEtaExpandCandidateCore (type : Expr) (params : Array Param) : Bool 
goal: Bool

full_name: Lean.Compiler.LCNF.FunDeclCore.isEtaExpandCandidate
code: abbrev FunDeclCore.isEtaExpandCandidate (decl : FunDecl) : Bool 
goal: Bool

full_name: Lean.Compiler.LCNF.etaExpandCore
code: def etaExpandCore (type : Expr) (params : Array Param) (value : Code) : CompilerM (Array Param × Code) 
goal: Lean.Compiler.LCNF.CompilerM (Array Lean.Compiler.LCNF.Param × Lean.Compiler.LCNF.Code)

full_name: Lean.Compiler.LCNF.etaExpandCore?
code: def etaExpandCore? (type : Expr) (params : Array Param) (value : Code) : CompilerM (Option (Array Param × Code)) 
goal: Lean.Compiler.LCNF.CompilerM (Option (Array Lean.Compiler.LCNF.Param × Lean.Compiler.LCNF.Code))

full_name: Lean.Compiler.LCNF.FunDeclCore.etaExpand
code: def FunDeclCore.etaExpand (decl : FunDecl) : CompilerM FunDecl 
goal: Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.FunDecl

full_name: Lean.Compiler.LCNF.Decl.etaExpand
code: def Decl.etaExpand (decl : Decl) : CompilerM Decl 
goal: Lean.Compiler.LCNF.CompilerM Lean.Compiler.LCNF.Decl