Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.goalsToMessageData goals = Lean.MessageData.joinSep (List.map Lean.MessageData.ofGoal goals) (Lean.toMessageData "\n\n")
Equations
- One or more equations did not get rendered due to their size.
Declaration name of the executing elaborator, used by
mkTacticInfoto persist it in the info treeelaborator : Lean.NameIf
true, enable "error recovery" in some tactics. For example,casestactic admits unsolved alternatives whenrecover == true. The combinatorwithoutRecoverdisables "error recovery" while executing. This is useful for tactics such asfirst | ... | ....recover : Bool
- term : Lean.Elab.Term.SavedState
- tactic : Lean.Elab.Tactic.State
Equations
Equations
- Lean.Elab.Tactic.instMonadTacticM = let i := inferInstanceAs (Monad Lean.Elab.Tactic.TacticM); Monad.mk
Equations
- Lean.Elab.Tactic.getGoals = do let a ← get pure a.goals
Equations
- Lean.Elab.Tactic.setGoals mvarIds = modify fun x => { goals := mvarIds }
Equations
- Lean.Elab.Tactic.pruneSolvedGoals = do let gs ← Lean.Elab.Tactic.getGoals let gs ← List.filterM (fun g => not <$> liftM (Lean.Meta.isExprMVarAssigned g)) gs Lean.Elab.Tactic.setGoals gs
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.Tactic.saveState = do let a ← liftM Lean.Elab.Term.saveState let a_1 ← get pure { term := a, tactic := a_1 }
Equations
- Lean.Elab.Tactic.SavedState.restore b = do liftM (Lean.Elab.Term.SavedState.restore b.term false) set b.tactic
Equations
- Lean.Elab.Tactic.getCurrMacroScope = do let a ← readThe Lean.Core.Context pure a.currMacroScope
Equations
- Lean.Elab.Tactic.getMainModule = do let a ← Lean.getEnv pure (Lean.Environment.mainModule a)
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.Tactic.mkInitialTacticInfo stx = do let mctxBefore ← Lean.getMCtx let goalsBefore ← Lean.Elab.Tactic.getUnsolvedGoals pure (Lean.Elab.Tactic.mkTacticInfo mctxBefore goalsBefore stx)
Equations
- Lean.Elab.Tactic.withTacticInfoContext stx x = do let a ← Lean.Elab.Tactic.mkInitialTacticInfo stx Lean.Elab.withInfoContext x a
Equations
- Lean.Elab.Tactic.throwNoGoalsToBeSolved = Lean.throwError (Lean.toMessageData "no goals to be solved")
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.Tactic.focusAndDone tactic = Lean.Elab.Tactic.focus do let a ← tactic Lean.Elab.Tactic.done pure a
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.Tactic.instMonadBacktrackSavedStateTacticM = { saveState := Lean.Elab.Tactic.saveState, restoreState := fun b => Lean.Elab.Tactic.SavedState.restore b }
Equations
- Lean.Elab.Tactic.tryCatch x h = do let b ← Lean.saveState tryCatch x fun ex => do Lean.Elab.Tactic.SavedState.restore b h ex
Equations
- Lean.Elab.Tactic.instMonadExceptExceptionTacticM = { throw := fun {α} => throw, tryCatch := fun {α} => Lean.Elab.Tactic.tryCatch }
Execute x with error recovery disabled
Equations
- Lean.Elab.Tactic.withoutRecover x = withReader (fun ctx => { elaborator := ctx.elaborator, recover := false }) x
Equations
- Lean.Elab.Tactic.orElse x y = tryCatch (Lean.Elab.Tactic.withoutRecover x) fun x => y ()
Equations
- Lean.Elab.Tactic.instOrElseTacticM = { orElse := Lean.Elab.Tactic.orElse }
Equations
- Lean.Elab.Tactic.instAlternativeTacticM = Alternative.mk (fun {x} => Lean.throwError (Lean.toMessageData "failed")) fun {α} => Lean.Elab.Tactic.orElse
Equations
- Lean.Elab.Tactic.saveTacticInfoForToken stx = if Option.isNone (Lean.Syntax.getPos? stx) = true then pure PUnit.unit else Lean.Elab.Tactic.withTacticInfoContext stx (pure ())
Equations
- One or more equations did not get rendered due to their size.
Adapt a syntax transformation to a regular tactic evaluator.
Equations
- Lean.Elab.Tactic.adaptExpander exp stx = do let stx' ← exp stx Lean.Elab.Tactic.withMacroExpansion stx stx' (Lean.Elab.Tactic.evalTactic stx')
Equations
- Lean.Elab.Tactic.appendGoals mvarIds = modify fun s => { goals := s.goals ++ mvarIds }
Equations
- One or more equations did not get rendered due to their size.
Return the first goal.
Equations
Equations
- One or more equations did not get rendered due to their size.
- Lean.Elab.Tactic.getMainGoal.loop [] = Lean.Elab.Tactic.throwNoGoalsToBeSolved
Return the main goal metavariable declaration.
Equations
Return the main goal tag.
Equations
- Lean.Elab.Tactic.getMainTag = do let a ← Lean.Elab.Tactic.getMainDecl pure a.userName
Return expected type for the main goal.
Equations
- Lean.Elab.Tactic.getMainTarget = do let a ← Lean.Elab.Tactic.getMainDecl liftM (Lean.Meta.instantiateMVars a.type)
Execute x using the main goal local context and instances
Equations
Evaluate tac at mvarId, and return the list of resulting subgoals.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Close main goal using the given expression. If checkUnassigned == true, then val must not contain unassinged metavariables.
Equations
- One or more equations did not get rendered due to their size.
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.Tactic.liftMetaTactic tactic = Lean.Elab.Tactic.liftMetaTacticAux fun mvarId => do let gs ← tactic mvarId pure ((), gs)
Equations
- One or more equations did not get rendered due to their size.
Use parentTag to tag untagged goals at newGoals.
If there are multiple new untagged goals, they are named using where idx > 0.
If there is only one new untagged goal, then we just use parentTag
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Elab.Tactic.getNameOfIdent' id = if Lean.Syntax.isIdent id = true then Lean.Syntax.getId id else `_
Use position of => $body for error messages.
If there is a line break before body, the message will be displayed on => only,
but the "full range" for the info view will still include body.
Equations
- Lean.Elab.Tactic.withCaseRef arrow body x = Lean.withRef (Lean.mkNullNode #[arrow, body]) x