Commit graph

1455 commits

Author SHA1 Message Date
Sebastian Ullrich
c1d75e21ea fix: fix pretty printers for imported ParserDescrs
... by interpreting them (imported or not) on the fly instead of storing them in the environment

/cc @leodemoura
2020-11-07 17:05:07 +01:00
Leonardo de Moura
4583f4344a fix: SyntaxNodeKind at elab and macro commands 2020-11-05 17:20:41 -08:00
Leonardo de Moura
2ea9d894e7 fix: SyntaxNodeKind for syntax declarations nested in namespaces
cc @Kha
2020-11-05 15:31:50 -08:00
Leonardo de Moura
73926f25fc chore: cleanup 2020-11-05 13:17:42 -08:00
Leonardo de Moura
29730157ff feat: support for _ and ?hole at all induction/cases variants
This commit also improves error position.
2020-11-03 17:20:53 -08:00
Leonardo de Moura
730b6aa3a3 feat: admit goal when case .. => .. fails 2020-11-03 17:20:53 -08:00
Leonardo de Moura
6466bbbaf9 feat: admit alternatives that failed 2020-11-03 17:20:53 -08:00
Leonardo de Moura
51e7aa8b75 fix: backtrack Term.State at TacticM
It contains references to metavariables that are declared in the
backtracked `MCtx`
2020-11-03 17:20:53 -08:00
Leonardo de Moura
27c495c198 fix: Tactic.orelse was using the wrong try ... catch ... 2020-11-03 17:20:53 -08:00
Leonardo de Moura
bfba03c6e1 fix: missing withMainMVarContext 2020-11-03 17:20:53 -08:00
Leonardo de Moura
4c3ea516b7 feat: clear targets 2020-11-03 17:20:53 -08:00
Leonardo de Moura
fa7fd4687c feat: induction with multiple targets 2020-11-03 17:20:53 -08:00
Leonardo de Moura
2001e1708f feat: add support for cases h_1:e_1, ..., h_n:e_n using elim 2020-11-03 17:20:53 -08:00
Leonardo de Moura
98d86bd902 chore: remove induction h:e
Users should use `cases h:e` instead
2020-11-03 17:20:52 -08:00
Leonardo de Moura
abd6914ac2 fix: missing indentExpr at error message 2020-11-03 17:20:52 -08:00
Leonardo de Moura
f28a7306f2 fix: append match_<idx> suffix only there is more than one alternative 2020-11-03 17:20:52 -08:00
Leonardo de Moura
c88d0c8a8c feat: populate builtinTacticSeqParser with tacticSeq 2020-11-03 17:20:52 -08:00
Leonardo de Moura
7654fa34e0 feat: add tacticSeq
@Kha This is a small hack to allow users to use `tacticSeq` in
`syntax` command. Example:
```
syntax "repeat" tacticSeq : tactic
```
2020-11-03 17:20:52 -08:00
Leonardo de Moura
f20a4244e4 chore: use named argument 2020-11-03 17:20:52 -08:00
Leonardo de Moura
dbe376a45a chore: control code size explosion 2020-11-03 17:20:52 -08:00
Leonardo de Moura
69abb0a35a feat: avoid unnecessary whnfs at unifyEqs 2020-11-03 17:20:52 -08:00
Leonardo de Moura
cdd79ac170 feat: add evalCasesUsing 2020-11-03 17:20:52 -08:00
Leonardo de Moura
9494552d82 chore: remove unnecessary group 2020-11-03 17:20:52 -08:00
Sebastian Ullrich
48d58d20c4 fix: app pretty printer
@leodemoura It was another instance of "syntax kinds of LHS of `<|>` must be known"
2020-11-03 15:12:23 +01:00
Sebastian Ullrich
e6b15ff6b4 feat: delaborator: apply pp options from Expr.mdata nodes
/cc @leodemoura
2020-11-03 12:36:33 +01:00
Sebastian Ullrich
c54dc4e037 feat: KVMap.set 2020-11-03 12:36:33 +01:00
Sebastian Ullrich
564d2be3b3 feat: KVMap.forIn 2020-11-03 12:36:33 +01:00
Sebastian Ullrich
95910108dc fix: delaborator: share mdata tree position with child 2020-11-03 12:36:33 +01:00
Leonardo de Moura
5854b5b9fe feat: disallow alternatives of the form | _ ids => ...
@Kha We are still accepting wildcard alternatives of the form
     `| _ => ...`
It is useful when we can discharge many alternatives using the same
tactic, and it looks like the wildcard alternative used in "match"-expressions.
2020-11-02 19:23:30 -08:00
Leonardo de Moura
68ef8655bb feat: improve getElimInfo 2020-11-02 18:45:52 -08:00
Leonardo de Moura
8d47e8be3b feat: add basic cases ... using ... methods 2020-11-02 18:28:26 -08:00
Leonardo de Moura
9686515d83 chore: minor 2020-11-02 18:17:10 -08:00
Leonardo de Moura
7d752353a1 feat: add getElimInfo 2020-11-02 17:51:18 -08:00
Leonardo de Moura
1bec9ac3e0 feat: add generalizeTargets and more general unifyEqs 2020-11-02 17:43:43 -08:00
Leonardo de Moura
7c44d4632b fix: induction ... generalizing 2020-11-02 16:58:14 -08:00
Leonardo de Moura
73903267a5 feat: extend cases tactic syntax 2020-11-02 16:46:33 -08:00
Leonardo de Moura
f64bd9e1e3 chore: remove unnecessary with at induction/cases tactics 2020-11-02 13:30:54 -08:00
Leonardo de Moura
83fb51f601 chore: remove StrategyAttrs 2020-11-02 06:39:21 -08:00
Leonardo de Moura
7b5f283507 chore: remove Expr.localE constructor
It was used by the old frontend
2020-11-01 09:37:48 -08:00
Leonardo de Moura
eb2b1d56eb chore: argument name 2020-11-01 08:03:37 -08:00
Leonardo de Moura
0d6a3080ad chore: remove broken expandWhere 2020-10-31 19:19:18 -07:00
Leonardo de Moura
de8f8f0e28 feat: improve local context reduction approximation 2020-10-31 19:19:18 -07:00
Leonardo de Moura
bcae20381f chore: naming convention 2020-10-31 19:19:18 -07:00
Leonardo de Moura
5d20cd1f46 chore: move CDot code to BuiltinNotation 2020-10-31 19:19:18 -07:00
Leonardo de Moura
85a3810b10 fix: where is not a term
See #191

TODO: add proper support for it in key places
2020-10-31 19:19:18 -07:00
Leonardo de Moura
665c3ed2f7 chore: cleanup 2020-10-31 19:19:18 -07:00
Leonardo de Moura
8c9f148e2f chore: use new termFor, termReturn, termTry, and tryUnless 2020-10-31 19:19:18 -07:00
Leonardo de Moura
eacca1342f fix: expandLiftMethod
We should not visit the new `termFor`, `termTry`, etc.
2020-10-31 19:19:18 -07:00
Leonardo de Moura
87bf97bdc1 feat: expand term try, for, unless, and return 2020-10-31 19:19:17 -07:00
Leonardo de Moura
d20081c548 feat: add term version of unless, for, try, and return notations 2020-10-31 19:19:17 -07:00