Equations
- Lean.IR.isTailCallTo g b = match b with | Lean.IR.FnBody.vdecl x ty (Lean.IR.Expr.fap f ys) (Lean.IR.FnBody.ret (Lean.IR.Arg.var y)) => x == y && f == g | x => false
Equations
- Lean.IR.usesModuleFrom env modulePrefix = List.any (Array.toList (Lean.Environment.allImportedModuleNames env)) fun modName => Lean.Name.isPrefixOf modulePrefix modName
@[inline]
@[inline]
Equations
- Lean.IR.CollectUsedDecls.collect f = modify fun s => Lean.NameSet.insert s f
Equations
- Lean.IR.CollectUsedDecls.collectInitDecl fn = do let env ← read match Lean.getInitFnNameFor? env fn with | some initFn => Lean.IR.CollectUsedDecls.collect initFn | x => pure ()
Equations
- One or more equations did not get rendered due to their size.
def
Lean.IR.collectUsedDecls
(env : Lean.Environment)
(decl : Lean.IR.Decl)
(used : optParam Lean.NameSet ∅)
:
Equations
- Lean.IR.collectUsedDecls env decl used = StateT.run' (Lean.IR.CollectUsedDecls.collectDecl decl env) used
@[inline]
@[inline]
@[inline]
@[inline]
Equations
- Lean.IR.CollectMaps.collectVar x t _fun_discr = match _fun_discr with | (vs, js) => (Std.HashMap.insert vs x t, js)
Equations
- Lean.IR.CollectMaps.collectParams ps s = Array.foldl (fun s p => Lean.IR.CollectMaps.collectVar p.x p.ty s) s ps 0 (Array.size ps)
@[inline]
Equations
- Lean.IR.CollectMaps.collectJP j xs _fun_discr = match _fun_discr with | (vs, js) => (vs, Std.HashMap.insert js j xs)
Equations
- One or more equations did not get rendered due to their size.