@[inline]
Equations
- Lean.Compiler.atMostOnce.seq f g d = match f d with | { found := found, result := false } => { found := found, result := false } | other => g other
Equations
- One or more equations did not get rendered due to their size.
@[inline]
Equations
@[inline]
Equations
- Lean.Compiler.atMostOnce.visitFVar x y { found := found, result := false } = { found := found, result := false }
- Lean.Compiler.atMostOnce.visitFVar x y { found := false, result := true } = { found := x == y, result := true }
- Lean.Compiler.atMostOnce.visitFVar x y { found := true, result := true } = { found := true, result := x != y }
Equations
- Lean.Compiler.atMostOnce.visit x (Lean.Expr.fvar y) = Lean.Compiler.atMostOnce.visitFVar y x
- Lean.Compiler.atMostOnce.visit x (f.app a) = Lean.Compiler.atMostOnce.visit x a >> Lean.Compiler.atMostOnce.visit x f
- Lean.Compiler.atMostOnce.visit x (Lean.Expr.lam binderName d b binderInfo) = Lean.Compiler.atMostOnce.visit x d >> Lean.Compiler.atMostOnce.visit x b
- Lean.Compiler.atMostOnce.visit x (Lean.Expr.forallE binderName d b binderInfo) = Lean.Compiler.atMostOnce.visit x d >> Lean.Compiler.atMostOnce.visit x b
- Lean.Compiler.atMostOnce.visit x (Lean.Expr.letE declName t v b nonDep) = Lean.Compiler.atMostOnce.visit x t >> Lean.Compiler.atMostOnce.visit x v >> Lean.Compiler.atMostOnce.visit x b
- Lean.Compiler.atMostOnce.visit x (Lean.Expr.mdata data e) = Lean.Compiler.atMostOnce.visit x e
- Lean.Compiler.atMostOnce.visit x (Lean.Expr.proj typeName idx e) = Lean.Compiler.atMostOnce.visit x e
- Lean.Compiler.atMostOnce.visit x x✝ = Lean.Compiler.atMostOnce.skip
@[export lean_at_most_once]
Return true iff the free variable with id x
occurs at most once in e
Equations
- Lean.Compiler.atMostOnce e x = match Lean.Compiler.atMostOnce.visit x e { found := false, result := true } with | { found := found, result := result } => result