Leonardo de Moura
4c6a589e6c
feat: indented do blocks
...
@Kha it is soooooo much nicer :)
2020-09-14 13:44:51 -07:00
Leonardo de Moura
3c2044f06b
chore: add coercion for new frontend
2020-09-13 10:12:25 -07:00
Leonardo de Moura
151012cb39
feat: remove emptyc elaboration hack
...
@Kha I removed the hack. We know get a nice error message.
2020-09-11 14:41:44 -07:00
Leonardo de Moura
ba4fdce508
feat: expand helper macros
2020-09-10 14:25:07 -07:00
Leonardo de Moura
d77dc5efb8
feat: add helper syntax
2020-09-10 13:31:45 -07:00
Leonardo de Moura
232fe8cadd
doc: document parser trick
2020-09-10 11:20:09 -07:00
Leonardo de Moura
20152c1192
chore: change by precedence
...
@Kha it now uses the same precedence of `fun`.
The main motivation is to allow us to write `@by { ... }` instead of
`@(by { ... })`.
BTW, I am considering disabling implicit lambdas for `by ...` expressions.
It is automatically "intro"ducing the implicit variables without
giving an opportunity for users to pick their names.
2020-09-10 11:17:42 -07:00
Leonardo de Moura
b24d1c2d90
feat: add .. syntax for pattern applications
2020-09-09 09:55:29 -07:00
Leonardo de Moura
cf944e32cf
chore: add back support for Lean3 mixfix/reserve syntax
...
We have tests that rely on them :(
2020-09-07 16:40:12 -07:00
Leonardo de Moura
804ebcec16
feat: adjust mixfix syntax
2020-09-07 15:55:02 -07:00
Leonardo de Moura
7dc1b461fa
chore: give a proper node to matchAlts
2020-09-04 18:42:09 -07:00
Leonardo de Moura
70c42456b9
feat: expand intro+matchAlts macro
2020-09-04 18:22:56 -07:00
Leonardo de Moura
a88b2be72a
feat: add intro + funMatchAlts syntax
2020-09-04 16:32:53 -07:00
Leonardo de Moura
ef64e1c25a
feat: fun+match macro
...
Example:
```
fun
| 0 => true
| _ => false
```
2020-09-04 16:23:01 -07:00
Leonardo de Moura
0883f96da0
chore: remove optional partial from 'let rec'
...
It will inherit the parent declaration annotation.
2020-09-02 17:02:22 -07:00
Leonardo de Moura
bda85f287c
feat: in trailing command
2020-09-02 09:52:54 -07:00
Leonardo de Moura
095e07d52d
chore: letrec => let rec
...
cc @Kha
2020-09-01 13:27:41 -07:00
Leonardo de Moura
b192293b8a
feat: allow arbitrary commands (except end) in a mutual block
...
This is useful, for example, for having a mutual command with macros
that expand into definitions.
2020-08-31 15:37:41 -07:00
Leonardo de Moura
2563d03ae2
feat: add notFollowedBy
2020-08-31 15:37:41 -07:00
Sebastian Ullrich
75b2dc1baf
refactor: simplify ppModule using new module parser
2020-08-31 15:44:58 +02:00
Sebastian Ullrich
2418d851fc
feat: declarative module parser
...
/cc @leodemoura
2020-08-31 14:45:21 +02:00
Leonardo de Moura
e3f3a1db8f
feat: add refine! tactic syntax
2020-08-30 16:00:24 -07:00
Leonardo de Moura
6f0e9452b2
chore: remove begin ... end syntax
...
We should use `by { ... }` from now on.
cc @Kha
2020-08-30 14:15:33 -07:00
Leonardo de Moura
0a0ca9f930
fix: funImplicitBinder
2020-08-30 08:10:58 -07:00
Leonardo de Moura
b4f938d859
chore: namedHole => syntheticHole
2020-08-30 08:04:15 -07:00
Leonardo de Moura
89e0fa1488
chore: allow ?_
...
Note that `?_` is not equivalent to `_`. Both do not have a name, but
`?_` is a synthetic metavariable which **cannot** be assigned by typing
constraints, and `_` is a regular metavariable.
We use `?_` to mark an anonymous hole that must be filled using tactics.
@Kha I will rename `namedHole` to `syntheticHole`
2020-08-30 07:54:34 -07:00
Leonardo de Moura
825d9643cd
feat: allow structure instances as fun binder without ()
...
The issue is that `{ x := ... }` was being parsed as an implicit
binder, and we were getting an error at `:=`.
2020-08-30 07:35:41 -07:00
Leonardo de Moura
fc65b76331
feat: lift useful binder term syntax to tactics
2020-08-30 07:15:42 -07:00
Leonardo de Moura
a9e70a4d83
feat: intro similar to fun
2020-08-29 15:15:24 -07:00
Leonardo de Moura
af86cc801d
feat: add change tactic parser
2020-08-29 08:10:55 -07:00
Leonardo de Moura
2287c7e7b3
feat: elaborate #print axioms command
2020-08-28 13:08:42 -07:00
Leonardo de Moura
cc1c9f3dfb
feat: add #print axioms
2020-08-28 12:26:07 -07:00
Leonardo de Moura
76bda91ff8
feat: add evalMatch for tactics
2020-08-27 18:05:06 -07:00
Leonardo de Moura
d2f9f250db
feat: add match tactic parser
2020-08-27 15:57:05 -07:00
Leonardo de Moura
546c108497
chore: revise letrec syntax
2020-08-26 10:50:32 -07:00
Leonardo de Moura
effaf64a07
feat: allow user to specify attributes letrec declarations
2020-08-26 09:57:46 -07:00
Leonardo de Moura
6a83577703
feat: letrec syntax
2020-08-26 09:33:52 -07:00
Leonardo de Moura
5ffbada3df
feat: add Lean.MonadEnv, Lean.MonadError, and Lean.MonadOptions
...
This is the first set of polymorphic methods. I will add more later,
and keep reducing code duplication.
cc @Kha
2020-08-22 16:00:43 -07:00
Leonardo de Moura
916b395d1b
chore: cleanup
2020-08-21 09:29:09 -07:00
Sebastian Ullrich
e5de32c2dd
feat: auto-generate header formatter
2020-08-21 16:43:55 +02:00
Sebastian Ullrich
5f30d62d9b
feat: [runParserAttributeHooks]
2020-08-21 16:38:41 +02:00
Sebastian Ullrich
14211cc932
refactor: more core
2020-08-21 15:51:37 +02:00
Leonardo de Moura
c55376a1ba
chore: more conventional MonadIO
2020-08-20 11:13:10 -07:00
Sebastian Ullrich
aa452b795d
refactor: make formatter precompiled as well
2020-08-20 15:29:33 +02:00
Leonardo de Moura
68a4c145f7
refactor: implement attribute hooks using CoreM
...
We were using a mix of `IO` and `Except`
2020-08-19 14:44:54 -07:00
Sebastian Ullrich
1840b4b1ff
fix: pretty printer with new syntax
2020-08-19 09:56:23 -07:00
Sebastian Ullrich
6cbfe2359b
chore: remove old syntax
2020-08-19 09:56:23 -07:00
Sebastian Ullrich
3091bd71e7
feat: unwrap basic token parsers
2020-08-19 09:56:23 -07:00
Sebastian Ullrich
d4952dc40b
feat: use insideQuot parsers
2020-08-19 09:56:23 -07:00
Sebastian Ullrich
ed7edf5661
feat: add checkInsideQuot/checkOutsideQuot/toggleInsideQuot parsers
...
One use case is to obtain fine-grained control over at what stage changed syntax is activated
2020-08-19 09:56:23 -07:00