Commit graph

154 commits

Author SHA1 Message Date
Leonardo de Moura
575b1187c5 feat: add Tactic.Context.recover for controlling error recovery
Moreover, when executing `tac_1 <|> tac_2`, we now disable error
recovery at `tac_1`.

closes #1126 #1127
2022-04-27 10:47:15 -07:00
Leonardo de Moura
de2e2447d2 chore: style 2022-04-07 17:35:05 -07:00
Leonardo de Moura
cd0d7e676f chore: rename renameMVar => setMVarUserName 2022-04-07 13:50:58 -07:00
Leonardo de Moura
4c9c62752e feat: improve checkpoint tactic 2022-03-31 20:51:53 -07:00
Leonardo de Moura
fa74194638 fix: missing s.restore at expandTacticMacroFns 2022-03-19 08:34:54 -07:00
Leonardo de Moura
2fb9a39cb4 refactor: implement MonadQuotation at CoreM 2022-03-10 09:55:20 -08:00
Leonardo de Moura
63a5cd5056 fix: trace_state messages should not be lost during backtracking 2022-02-28 11:07:41 -08:00
Leonardo de Moura
f22b48b226 fix: display all remaining goals at fail tactic error message 2022-02-26 09:49:06 -08:00
Leonardo de Moura
ccddd0d932 feat: show proof state/unclosed goal message on empty tactic sequences
closes #361
2022-01-31 16:22:08 -08:00
Leonardo de Moura
68bd55af32 chore: fix codebase 2021-12-10 13:12:09 -08:00
Sebastian Ullrich
9cca1a57e0 feat: generalize syntax of fvar-accepting tactics 2021-11-29 10:06:15 -08:00
Gabriel Ebner
bfc74decde feat: add info field to Syntax.node 2021-10-26 20:19:27 +02:00
Leonardo de Moura
5a7badd69a feat: add support for erasing keyed attributes
This commit addresses any issue described at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Eq.2Endrec.20vs.20Eq.2Erec
2021-09-09 14:28:41 -07:00
Leonardo de Moura
3714cf16ec refactor: lazy evaluation for <|>
see #617
2021-09-07 17:06:10 -07:00
Leonardo de Moura
391366ef24 refactor: add annotation for displaying conv state 2021-09-02 15:52:11 -07:00
Leonardo de Moura
b18af2c15c feat: basic support for displaying conv state 2021-09-01 15:34:59 -07:00
Leonardo de Moura
5a7044365b feat: add instances Alternative MetaM and Alternative TacticM 2021-08-22 22:29:09 -07:00
Leonardo de Moura
60ff468a8b feat: add simpGoal helper method
chore: rename `simpGoal?`
2021-08-17 21:32:32 -07:00
Sebastian Ullrich
16026e9edd perf: restore monad instance specialization hack 2021-08-12 21:09:09 +02:00
Leonardo de Moura
8f9fa8d04c refactor: add BuiltinTactic.lean 2021-06-28 10:08:42 -07:00
Sebastian Ullrich
30a0954424 refactor: revert MonadRef changes 2021-06-21 10:17:26 -07:00
Sebastian Ullrich
da4c46370d feat: store elaborator declaration name in info tree 2021-06-21 10:17:26 -07:00
Sebastian Ullrich
b4e9ba1500 perf: specialize more monad instances 2021-06-17 11:25:58 +02:00
Sebastian Ullrich
b82b90a687 feat: KeyedDeclAttribute: expose declaration names 2021-06-06 15:32:58 +02:00
Sebastian Ullrich
93327e2324 fix: tactic state on {/· 2021-05-21 17:13:33 -07:00
Sebastian Ullrich
9f3ddb0c43 fix: do not store solved goals in info tree 2021-05-20 15:17:54 -07:00
Leonardo de Moura
37c1608ec3 feat: improve error handling in tactic blocks 2021-05-15 20:18:48 -07:00
Leonardo de Moura
b52edf1259 fix: fixes #452
The new syntax is similar to `matchAlts` and uses `colGe`.
The first `|` is not optional anymore.
2021-05-10 17:28:10 -07:00
Leonardo de Moura
7d39a0d56c chore: prepare to change first syntax 2021-05-10 17:05:31 -07:00
Leonardo de Moura
2a676b6dfb fix: fixes #449 2021-05-10 13:10:59 -07:00
Leonardo de Moura
48bffedc74 fix: unresolved holes in the exact tactic, backtracking issues
This commit also adds the `throwAbortTactic` for throwing "silent"
exceptions in `TacticM`.
2021-05-06 13:44:01 -07:00
Sebastian Ullrich
76c66fc4d4 fix: error message 2021-05-05 14:45:50 +02:00
Sebastian Ullrich
c22f4ffaec fix: partial fix of focus goal state 2021-05-04 19:11:05 +02:00
Sebastian Ullrich
b8b8cc79a9 feat: show initial case goal on ... => for induction/cases/case/match 2021-05-02 23:07:15 +02:00
Sebastian Ullrich
8863761401 feat: show initial state for tactic combinators by default 2021-05-02 23:07:15 +02:00
Leonardo de Moura
1a0fc816b1 feat: rename inaccessible variable names at cases 2021-05-01 21:51:58 -07:00
Leonardo de Moura
93189e0fce chore: prepare to change case tactic 2021-05-01 19:53:44 -07:00
Sebastian Ullrich
60f2faefb7 feat: display placeholder & goal errors even on parse error 2021-04-17 23:46:15 +02:00
Leonardo de Moura
635a320455 chore: ignore mdata at intros 2021-04-12 22:38:15 -07:00
Leonardo de Moura
23f49c35fc refactor: MonadBacktrack for TacticM 2021-04-11 19:10:41 -07:00
Leonardo de Moura
ac35b543bf feat: add addional CompletionInfo 2021-04-03 11:17:51 -07:00
Leonardo de Moura
3846fa0432 feat: add evalUnknown 2021-03-31 17:05:34 -07:00
Leonardo de Moura
f7d055830b feat: save TacticInfo at ; 2021-03-29 20:31:48 -07:00
Leonardo de Moura
81e986c11c fix: intro with pattern 2021-03-25 17:19:17 -07:00
Leonardo de Moura
880f1372bd feat: set pp.inaccessibleNames true when visualizing tactic state
@Kha The default value (false) for `pp.inaccessibleNames == false` help when
visualizing error messages (see test
`hidingInaccessibleNames.lean`). We added this feature after to hide
intermediate variables created by `match_syntax`.
However, this default value confused me in tactic mode. For example,
it will hide a hypotheses `x : Fin 0` if nobody depends on it, but as
a user we want to know we have it since we can close the goal using
it. Thus, I added `withPPInaccessibleNames act`, it executes `act`
using `pp.inaccessibleNames true` if the user did not explicitly set
it. I use this combinator at `FileWorker` and when producing the
`unsolved goals` error message. In all other scenarios, I believe
hiding these inaccessible variables is a good thing.
2021-03-21 18:21:46 -07:00
Leonardo de Moura
0720a53a9d chore: refactoring and cleanup 2021-03-17 14:56:08 -07:00
Sebastian Ullrich
f4c3d068ae feat: uniform "unsolved case" positions with fullRange
/cc @leodemoura
2021-03-17 12:45:15 +01:00
Leonardo de Moura
7dc6721fea fix: missing pushScope and popScope 2021-03-16 16:42:45 -07:00
Leonardo de Moura
50fd39db89 fix: bug at allGoals 2021-03-12 17:48:33 -08:00
Leonardo de Moura
d330f1e2e2 feat: rotateLeft and rotateRight tactics 2021-03-12 17:13:03 -08:00