Simon Hudon
a64e78b90b
feat: add std streams
...
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
2020-06-16 12:06:53 +02:00
Leonardo de Moura
6f0192581a
feat: change precedence for fun and do parsing rules to maxPrec
...
Motivation: avoid `$`. See new test.
cc @Kha
2020-06-11 16:24:04 -07:00
Leonardo de Moura
f92166e913
chore: fix test
2020-06-10 16:43:44 -07:00
Leonardo de Moura
f838b80e03
fix: elaboration functions for parser! and tparser!
2020-06-10 16:42:42 -07:00
Leonardo de Moura
f0a9e54a69
chore: make sure leading and trailing parsers use the same kind of check
2020-06-10 13:41:10 -07:00
Leonardo de Moura
25c1986439
chore: fix tests
2020-06-09 14:11:34 -07:00
Leonardo de Moura
7fce8b5d1f
fix: notation command
...
@Kha Note that I had to write the weird pattern
```
match_syntax stx with
| `(notation:$prec $items* => $rhs) => expandNotationAux stx prec items rhs
| `(notation $noprec* $items* => $rhs) => expandNotationAux stx none items rhs
| _ => Macro.throwUnsupported
```
with the weird `$noprec*` to match the case where the optional
precedence is not provided. I realized this is not a bug, but
I guess most users will be puzzled by this behavior. If we had a kind
for `notationItem`, I would be able to write
```
`(notation $items:notationItems* => $rhs)
```
2020-06-09 14:11:34 -07:00
Leonardo de Moura
4250bc630e
chore: fix tests
2020-06-08 16:18:46 -07:00
Leonardo de Moura
2b58ecea60
chore: fix test
2020-06-08 16:13:52 -07:00
Leonardo de Moura
f46dcd7a13
chore: fix some tests
2020-06-08 16:12:06 -07:00
Leonardo de Moura
aa66fc376b
chore: fix test
2020-06-08 16:12:05 -07:00
Leonardo de Moura
b3a8d417b2
chore: fix test
2020-06-08 16:12:05 -07:00
Leonardo de Moura
62cf913d6a
fix: interaction between errToSorry and observing.
...
@Kha I implemented the solution 1 I described at Zulip.
I also tried to document the issue, and made sure test
`choiceMacroRules` fail if the bug is reintroduced.
2020-06-08 12:37:43 -07:00
Sebastian Ullrich
6614b4d6e3
fix: use exact instead of prefix token match when inheriting precedence
...
/cc @leodemoura :)
2020-05-28 14:14:52 +02:00
Leonardo de Moura
5dffa0093a
feat: retrieve implicit lbp from Environment at syntax command
...
@Kha It is not clear to me why I had to change the following line
```
-syntax term ">>>" term : foo
+syntax term:1 ">>>":1 term : foo
```
The test breaks without it.
2020-05-27 17:11:57 -07:00
Leonardo de Moura
17b6957f6c
chore: fix tests
2020-05-26 15:05:01 -07:00
Leonardo de Moura
9c0bd9dd41
chore: fix tests
2020-05-26 15:05:00 -07:00
Sebastian Ullrich
c11e88c768
test: Reparen: don't remove parentheses in syntax quotations
2020-05-26 14:32:42 +02:00
Sebastian Ullrich
674fea4876
fix: parenthesizer: adjust lbp after parenthesization
2020-05-26 14:32:42 +02:00
Sebastian Ullrich
b519997b58
feat: parenthesizer: handle choice
2020-05-26 14:32:42 +02:00
Sebastian Ullrich
60ac03916e
feat: introduce anonymous antiquotations for all categories
2020-05-26 14:32:42 +02:00
Sebastian Ullrich
52b9bb35ea
test: reparenthesize files
2020-05-26 11:26:57 +02:00
Leonardo de Moura
a01552d361
chore: fix some tests
...
Two of them are still broken due to a bug in the new elaborator.
2020-05-21 09:50:20 -07:00
Leonardo de Moura
3ea9edbd13
chore: test for simulating old { Prod . ... } syntax
2020-05-20 16:06:57 -07:00
Leonardo de Moura
22ae065d16
feat: add { ... : <expected-type> } syntax
...
It replaces the `{ <struct-name> . ... }` syntax.
2020-05-20 15:24:27 -07:00
Leonardo de Moura
bd58048449
chore: { <source> with ... } syntax
2020-05-20 15:08:43 -07:00
Sebastian Ullrich
3d891be49e
feat: delaborator: do not set whitespace information
2020-05-20 11:54:53 -07:00
Sebastian Ullrich
053d4bab1c
chore: factor out and unify common test behavior; retrieve lean from PATH
...
`./test_single.sh foo.lean yes` is now `./test_single.sh -i foo.lean`
2020-05-14 14:38:52 +02:00
Sebastian Ullrich
2325f5d358
chore: ignore more test output files
2020-05-14 14:38:52 +02:00
Leonardo de Moura
ebc0663b3f
chore: fix tests
2020-05-12 15:02:03 -07:00
Sebastian Ullrich
e7920bcdb5
chore: remove test special case
2020-05-04 11:11:11 +02:00
Sebastian Ullrich
8f67db0101
refactor: never implicitly ignore monadic results
...
Also change `do e; f` to desugar to `e *> f` so that it is affected as well
2020-04-23 11:09:59 -07:00
Leonardo de Moura
360cebf680
fix: induction tactic must check expected major premise type
...
`whnfUntil` now returns `Option Expr`.
2020-04-09 11:18:02 -07:00
Leonardo de Moura
9a5bed0f94
fix: missing ! at whnfUntil
2020-04-09 10:49:20 -07:00
Leonardo de Moura
7a5fcfae8b
feat: add [recursor] attribute to Iff.elim
2020-04-09 10:45:27 -07:00
Leonardo de Moura
40336131bb
feat: do not switch to term mode in the RHS of induction and cases tactics
2020-04-08 17:45:06 -07:00
Daniel Selsam
7c1c0dc01e
test: example that requires the instance arg reordering
2020-04-08 16:56:14 -07:00
Leonardo de Moura
e22af8d1ef
feat: add FloatArray
...
cc @dselsam
2020-04-07 18:05:54 -07:00
Leonardo de Moura
b8ea55c989
feat: expose some transcendental functions from the C library
...
cc @dselsam
2020-04-06 15:22:25 -07:00
Leonardo de Moura
8e84a8c9ec
feat: Float from big numbers
2020-04-06 14:05:17 -07:00
Leonardo de Moura
22fc56f5c8
chore: fix test
2020-03-31 10:10:57 -07:00
Leonardo de Moura
af8bc28be0
fix: typo at IR.Expr.alphaEqv
2020-03-31 10:04:59 -07:00
Daniel Selsam
722ea2b694
failing test for suspicious behavior
2020-03-31 10:03:22 -07:00
Sebastian Ullrich
b6fc9428f1
fix: support Windows newlines and '\r' escape
2020-03-27 13:21:21 -07:00
Leonardo de Moura
0595e8a78a
feat: add tryPureCoe
...
@Kha It seems to work reasonably well. It didn't break any test.
2020-03-27 11:20:43 -07:00
Leonardo de Moura
02acdee9ce
feat: disable implicit lambda insertion for fun containing {} or []
...
cc @Kha
2020-03-26 14:32:12 -07:00
Leonardo de Moura
b4b5f2736f
feat: elaborate [] and {} binder annotations in lambda abstractions
...
We can simulate Lean3 behavior.
2020-03-26 14:20:39 -07:00
Leonardo de Moura
07ffa535fe
refactor: decide whether to insert implicit lambdas AFTER macro expansion
...
cc @Kha
2020-03-26 13:53:15 -07:00
Leonardo de Moura
2b3bdbe0cf
test: implicit lambdas + notation
2020-03-26 12:31:04 -07:00
Leonardo de Moura
e682c1c88f
fix: make sure @ disable new syntax and macros too
...
cc @Kha
2020-03-26 12:14:55 -07:00