- cache : Std.HashMap.Raw Lean.Expr Bool
Instances For
unsafe def
Lean.HasConstCache.containsUnsafe
{declNames : Array Lean.Name}
(e : Lean.Expr)
:
StateM (Lean.HasConstCache declNames) Bool
Equations
Instances For
unsafe def
Lean.HasConstCache.containsUnsafe.cache
{declNames : Array Lean.Name}
(e : Lean.Expr)
(r : Bool)
:
StateM (Lean.HasConstCache declNames) Bool
Equations
- Lean.HasConstCache.containsUnsafe.cache e r = do modify fun (x : Lean.HasConstCache declNames) => match x with | { cache := cache } => { cache := cache.insert e r } pure r
Instances For
@[implemented_by Lean.HasConstCache.containsUnsafe]
opaque
Lean.HasConstCache.contains
{declNames : Array Lean.Name}
(e : Lean.Expr)
:
StateM (Lean.HasConstCache declNames) Bool
Return true iff e
contains the constant declName
.
Remark: the results for visited expressions are stored in the state cache.