Collect unassigned metavariables occuring in the given expression.
Remark: if e contains ?m and there is a t assigned to ?m, we
collect unassigned metavariables occurring in t.
Remark: if e contains ?m and ?m is delayed assigned to some term t,
we collect ?m and unassigned metavariables occurring in t.
We collect ?m because it has not been assigned yet.
Return metavariables in occuring the given expression. See collectMVars
Equations
- Lean.Meta.getMVars e = do let discr ← StateRefT'.run (Lean.Meta.collectMVars e) { visitedExpr := ∅, result := #[] } match discr with | (fst, s) => pure s.result
Similar to getMVars, but removes delayed assignments.
Equations
- Lean.Meta.getMVarsNoDelayed e = do let mvarIds ← Lean.Meta.getMVars e Array.filterM (fun mvarId => not <$> Lean.Meta.isDelayedAssigned mvarId) mvarIds 0 (Array.size mvarIds)
Equations
- Lean.Meta.getMVarsAtDecl d = do let discr ← StateRefT'.run (Lean.Meta.collectMVarsAtDecl d) { visitedExpr := ∅, result := #[] } match discr with | (fst, s) => pure s.result