lean4-htt/src/Lean/Elab
Kyle Miller eea953b94f
feat: push/pop tactic API (#5720)
Adds `pushGoal`/`pushGoals` and `popGoal` for manipulating the goal
state. These are an alternative to `replaceMainGoal` and `getMainGoal`,
and with them you don't need to worry about making sure nothing clears
assigned metavariables from the goal list between assigning the main
goal and using `replaceMainGoal`.

Modifies `closeMainGoalUsing`, which is like a `TacticM` version of
`liftMetaTactic`. Now the callback is run in a context where the main
goal is removed from the goal list, and the callback is free to modify
the goal list. Furthermore, the `checkUnassigned` argument has been
replaced with `checkNewUnassigned`, which checks whether the value
assigned to the goal has any *new* metavariables, relative to the start
of execution of the callback. This API is sufficient for the `exact`
tactic for example.

Modifies `withCollectingNewGoalsFrom` to take the `parentTag` argument
explicitly rather than indirectly via `getMainTag`. This is needed when
used under `closeMainGoalUsing`.

Modifies `elabTermWithHoles` to optionally take `parentTag?`. It
defaults to `getMainTag` if it is `none`.

Renames `Tactic.tryCatch` to `Tactic.tryCatchRestore`, and adds a
`Tactic.tryCatch` that doesn't do backtracking.

---------

Co-authored-by: Kim Morrison <kim@tqft.net>
2024-10-16 03:54:58 +00:00
..
Deriving chore: rename List.join to List.flatten 2024-10-14 22:28:12 +11:00
InfoTree feat: whitespace tactic completion & tactic completion docs (#5666) 2024-10-10 13:28:34 +00:00
PreDefinition refactor: more idiomatic syntax for if h: (#5567) 2024-10-01 15:23:54 +00:00
Quotation feat: reserved names (#3675) 2024-03-15 00:33:22 +00:00
Tactic feat: push/pop tactic API (#5720) 2024-10-16 03:54:58 +00:00
App.lean feat: let dot notation see through CoeFun instances (#5692) 2024-10-14 21:49:33 +00:00
Arg.lean feat: actual implementation for #5283 (#5512) 2024-09-29 01:22:12 +00:00
Attributes.lean chore: fix linter errors (#4502) 2024-06-19 18:24:08 +00:00
AutoBound.lean doc: fix option name (#5150) 2024-08-25 07:16:44 +00:00
AuxDef.lean chore: fix spelling mistakes in src/Lean/Elab/ (#5435) 2024-09-23 21:58:16 +00:00
BinderPredicates.lean
Binders.lean feat: localize universe metavariable errors at let bindings and fun binders (#5402) 2024-09-24 05:30:42 +00:00
BindersUtil.lean
BuiltinCommand.lean feat: better #eval command (#5627) 2024-10-08 20:51:46 +00:00
BuiltinEvalCommand.lean feat: support let rec in #eval (#5663) 2024-10-11 06:46:16 +00:00
BuiltinNotation.lean refactor: more idiomatic syntax for if h: (#5567) 2024-10-01 15:23:54 +00:00
BuiltinTerm.lean fix: the elaboration warning did not mention pp.maxSteps (#5710) 2024-10-14 17:28:28 +00:00
Calc.lean fix: make "use `set_option diagnostics true" message conditional on current setting (#4781) 2024-07-31 03:53:09 +00:00
CheckTactic.lean chore: missing withSynthesize in #check_tactic (#4489) 2024-06-18 05:24:45 +00:00
Command.lean feat: better #eval command (#5627) 2024-10-08 20:51:46 +00:00
ComputedFields.lean refactor: Split Constructions module (#4656) 2024-07-05 08:25:44 +00:00
Config.lean
Declaration.lean chore: deprecate := variants of inductive and structure (#5542) 2024-10-11 05:54:18 +00:00
DeclarationRange.lean
DeclModifiers.lean chore: fix spelling mistakes in src/Lean/Elab/ (#5435) 2024-09-23 21:58:16 +00:00
DeclNameGen.lean refactor: more idiomatic syntax for if h: (#5567) 2024-10-01 15:23:54 +00:00
DeclUtil.lean feat: localize universe metavariable errors at let bindings and fun binders (#5402) 2024-09-24 05:30:42 +00:00
DefView.lean fix: [implemented_by] at functions defined by well-founded recursion (#4508) 2024-06-20 00:06:38 +00:00
Deriving.lean
Do.lean refactor: more idiomatic syntax for if h: (#5567) 2024-10-01 15:23:54 +00:00
ElabRules.lean
Eval.lean
Exception.lean feat: incremental elaboration of definition headers, bodies, and tactics (#3940) 2024-05-22 13:23:30 +00:00
Extra.lean chore: remove repeated words (#5438) 2024-09-24 03:40:11 +00:00
Frontend.lean chore: clean up cmdline snapshots logic (#5043) 2024-08-14 15:10:37 +00:00
GenInjective.lean feat: reserved names (#3675) 2024-03-15 00:33:22 +00:00
GuardMsgs.lean fix: now linters in general do not run on #guard_msgs itself (#5644) 2024-10-08 17:35:07 +00:00
Import.lean chore: revert "fix: make import resolution case-sensitive on all platforms" (#4896) 2024-08-01 13:55:37 +00:00
Inductive.lean chore: rename List.join to List.flatten 2024-10-14 22:28:12 +11:00
InfoTree.lean
InheritDoc.lean feat: @[builtin_doc] attribute (part 2) (#3918) 2024-09-13 08:05:10 +00:00
LetRec.lean feat: termination_by structural (#4542) 2024-07-01 16:51:30 +00:00
Level.lean fix: mutual inductives with instance parameters (#4342) 2024-06-04 17:35:41 +00:00
Macro.lean
MacroArgUtil.lean feat: quotations for parser aliases (#4307) 2024-05-30 09:22:22 +00:00
MacroRules.lean
Match.lean refactor: more idiomatic syntax for if h: (#5567) 2024-10-01 15:23:54 +00:00
MatchAltView.lean
MatchExpr.lean perf: match_expr join points (#3580) 2024-03-03 18:15:49 +00:00
Mixfix.lean
MutualDef.lean refactor: more idiomatic syntax for if h: (#5567) 2024-10-01 15:23:54 +00:00
Notation.lean feat: apply app unexpanders for all prefixes of an application (#3375) 2024-02-27 07:04:17 +00:00
Open.lean
ParseImportsFast.lean
PatternVar.lean chore: make Array functions either semireducible or use structural recursion (#5420) 2024-09-23 02:41:41 +00:00
PreDefinition.lean feat: generate f.eq_unfold lemmas (#5141) 2024-08-29 16:47:40 +00:00
Print.lean feat: fine-grained equational lemmas for non-recursive functions (#4154) 2024-08-22 13:26:58 +00:00
Quotation.lean refactor: more idiomatic syntax for if h: (#5567) 2024-10-01 15:23:54 +00:00
RecAppSyntax.lean chore: fix spelling mistakes in src/Lean/Elab/ (#5435) 2024-09-23 21:58:16 +00:00
SetOption.lean fix: don't use info nodes before cursor for completion (#3778) 2024-04-02 08:49:24 +00:00
StructInst.lean feat: allow explicit mode with field notation (#5528) 2024-10-09 07:03:46 +00:00
Structure.lean chore: deprecate := variants of inductive and structure (#5542) 2024-10-11 05:54:18 +00:00
Syntax.lean chore: missing registerTraceClass (#4369) 2024-06-06 00:53:16 +00:00
SyntheticMVars.lean refactor: more idiomatic syntax for if h: (#5567) 2024-10-01 15:23:54 +00:00
Tactic.lean chore: upstream classical tactic (#5730) 2024-10-16 03:35:41 +00:00
Term.lean fix: store local context for 'don't know how to synthesize implicit argument' errors (#5658) 2024-10-09 08:40:21 +00:00
Time.lean chore: upstream #time command (#5044) 2024-08-15 00:17:48 +00:00
Util.lean feat: simp to still work even if one simp arg does not work (#4177) 2024-06-03 14:21:31 +00:00