LCNF local context.
- letDecls : Std.HashMap Lean.FVarId Lean.Compiler.LCNF.LetDecl
- funDecls : Std.HashMap Lean.FVarId Lean.Compiler.LCNF.FunDecl
Instances For
Equations
- Lean.Compiler.LCNF.instInhabitedLCtx = { default := { params := default, letDecls := default, funDecls := default } }
def
Lean.Compiler.LCNF.LCtx.addParam
(lctx : Lean.Compiler.LCNF.LCtx)
(param : Lean.Compiler.LCNF.Param)
:
Equations
- lctx.addParam param = { params := lctx.params.insert param.fvarId param, letDecls := lctx.letDecls, funDecls := lctx.funDecls }
Instances For
def
Lean.Compiler.LCNF.LCtx.addLetDecl
(lctx : Lean.Compiler.LCNF.LCtx)
(letDecl : Lean.Compiler.LCNF.LetDecl)
:
Equations
- lctx.addLetDecl letDecl = { params := lctx.params, letDecls := lctx.letDecls.insert letDecl.fvarId letDecl, funDecls := lctx.funDecls }
Instances For
def
Lean.Compiler.LCNF.LCtx.addFunDecl
(lctx : Lean.Compiler.LCNF.LCtx)
(funDecl : Lean.Compiler.LCNF.FunDecl)
:
Equations
- lctx.addFunDecl funDecl = { params := lctx.params, letDecls := lctx.letDecls, funDecls := lctx.funDecls.insert funDecl.fvarId funDecl }
Instances For
def
Lean.Compiler.LCNF.LCtx.eraseParam
(lctx : Lean.Compiler.LCNF.LCtx)
(param : Lean.Compiler.LCNF.Param)
:
Equations
- lctx.eraseParam param = { params := lctx.params.erase param.fvarId, letDecls := lctx.letDecls, funDecls := lctx.funDecls }
Instances For
def
Lean.Compiler.LCNF.LCtx.eraseParams
(lctx : Lean.Compiler.LCNF.LCtx)
(ps : Array Lean.Compiler.LCNF.Param)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.LCtx.eraseLetDecl
(lctx : Lean.Compiler.LCNF.LCtx)
(decl : Lean.Compiler.LCNF.LetDecl)
:
Equations
- lctx.eraseLetDecl decl = { params := lctx.params, letDecls := lctx.letDecls.erase decl.fvarId, funDecls := lctx.funDecls }
Instances For
partial def
Lean.Compiler.LCNF.LCtx.eraseFunDecl
(lctx : Lean.Compiler.LCNF.LCtx)
(decl : Lean.Compiler.LCNF.FunDecl)
(recursive : optParam Bool true)
:
partial def
Lean.Compiler.LCNF.LCtx.eraseAlts
(alts : Array Lean.Compiler.LCNF.Alt)
(lctx : Lean.Compiler.LCNF.LCtx)
:
partial def
Lean.Compiler.LCNF.LCtx.eraseCode
(code : Lean.Compiler.LCNF.Code)
(lctx : Lean.Compiler.LCNF.LCtx)
:
Convert a LCNF local context into a regular Lean local context.
Equations
- One or more equations did not get rendered due to their size.