Commit graph

1477 commits

Author SHA1 Message Date
Sebastian Ullrich
e4f53fd92d chore: adjust list & array spacing 2020-11-10 10:11:24 -08:00
Sebastian Ullrich
ce9be52ffb feat: pretty print lists and arrays 2020-11-10 10:11:24 -08:00
Sebastian Ullrich
3665e3b7b5 feat: pretty print match
Fixes #177
2020-11-10 10:11:24 -08:00
Sebastian Ullrich
3d9f97574b refactor: use and improve mkAppStx 2020-11-10 10:11:24 -08:00
Leonardo de Moura
7e8a7e6660 feat: elaborate fun/forall binder extensions 2020-11-09 19:00:40 -08:00
Leonardo de Moura
25083fba9f feat: extend binder syntax 2020-11-09 18:41:48 -08:00
Leonardo de Moura
defa45ae2f feat: improve error message
when match-expression LHSs still contain metavariables after elaboration
2020-11-09 18:26:14 -08:00
Leonardo de Moura
f91b2cc89c chore: typo 2020-11-09 18:13:02 -08:00
Leonardo de Moura
82d6dd2eb6 feat: improve Structural.lean 2020-11-09 13:23:25 -08:00
Leonardo de Moura
a8a457b355 refactor: move getTailInfo/copyTailInfo/etc to LeanInit 2020-11-08 11:52:14 -08:00
Leonardo de Moura
029510d4f5 feat: syntax for setting allowTrailingSep
@Kha This commit allows us to set `allowTrailingSep` for `sepBy` and
`sepBy1` from the `syntax` command.
```lean
syntax "[" (sepBy (allowTrailingSep := true) term ",") "]" : term
```
The new syntax is a bit verbose :)
What do you think? Any suggestions?
2020-11-08 08:12:54 -08:00
Leonardo de Moura
fc4d991707 feat: add allowTrailingSep parameter to ParserDescr.sepBy and ParserDescr.sepBy1 2020-11-08 07:51:10 -08:00
Leonardo de Moura
d618bf5b16 feat: expand new syntax Syntax 2020-11-08 07:22:38 -08:00
Leonardo de Moura
231b20c4fb feat: add syntax parsers for withPosition and checkCol 2020-11-08 07:02:14 -08:00
Leonardo de Moura
34cba1ec2e feat: add withPosition and checkCol constructors 2020-11-08 06:42:25 -08:00
Leonardo de Moura
2d2d39c78e chore: use mut 2020-11-07 17:32:13 -08:00
Leonardo de Moura
6c6595cd9b feat: only allow variables declared with mut to be reassigned 2020-11-07 17:32:13 -08:00
Leonardo de Moura
1c558d279f feat: add mut modifier to doLet 2020-11-07 17:32:13 -08:00
Leonardo de Moura
89fd299c9e chore: prepare mut 2020-11-07 17:32:12 -08:00
Leonardo de Moura
1e30d0831d feat: allow recursive application in the discriminant of a nested match 2020-11-07 17:32:12 -08:00
Leonardo de Moura
81d6e065e7 chore: adjust files and tests 2020-11-07 17:32:12 -08:00
Leonardo de Moura
4a55ff107b feat: add relaxedReassignments option 2020-11-07 17:32:12 -08:00
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