Leonardo de Moura
993ae96fb7
chore: elaborate let_core
2020-01-25 15:21:47 -08:00
Leonardo de Moura
bdb9f4c86e
feat: allow raw identifiers to be used where terms are expected
...
@Kha this commit fix another example of weird error message I have
experienced in the last few days.
The macro
```lean
syntax "case!" ident ":" term "with" term "," term : term
macro_rules
| `(case! $h : $cond with $t, $e) =>
`((fun $h => cond $h $t $e) $cond)
```
is accepted, but as in `fun` binders, we get a weird error when
trying to elaborate an instance of the macro.
Example:
```lean
check case! h : 0 == 0 with h, not h
```
2020-01-25 14:55:32 -08:00
Leonardo de Moura
6d5de9f965
feat: handle raw identifiers as binders in fun
...
@Kha I am adding this kind of feature to improve the user experience.
For example, the macro
```
syntax "[" ident "↦" term "]" : term
macro_rules
| `([$x ↦ $v]) => `(fun $x => $v)
```
is accepted and looks perfectly reasonable.
However, before this commit, we would get a nasty error when
elaborating
```lean
check [x ↦ x + 1]
```
2020-01-25 14:55:21 -08:00
Sebastian Ullrich
2509b3913a
Revert "feat: add std streams"
...
This reverts commit 7575a32035 .
2020-01-25 16:32:06 +01:00
Sebastian Ullrich
0be2424910
Revert "feat: override standard streams"
...
This reverts commit bd87ea5d5e .
2020-01-25 16:32:06 +01:00
Sebastian Ullrich
a4858bf9f9
Revert "feat: MonadIO now extends MonadExcept IO.Error"
...
This reverts commit c0a7495495 .
2020-01-25 16:32:06 +01:00
Sebastian Ullrich
e82add884f
Revert "fix: test files"
...
This reverts commit 95f951bdf2 .
2020-01-25 16:32:06 +01:00
Leonardo de Moura
850729ba1b
chore: fix tests
2020-01-24 17:32:21 -08:00
Leonardo de Moura
364bb7bdf7
fix: proper Name literals
...
cc @kha
2020-01-24 12:38:15 -08:00
Leonardo de Moura
4425feaebb
chore: fix tests
2020-01-23 16:08:52 -08:00
Simon Hudon
95f951bdf2
fix: test files
2020-01-23 16:07:29 -08:00
Leonardo de Moura
060a68d73f
feat: remove addMacroScope approximation
2020-01-23 14:59:31 -08:00
Leonardo de Moura
0c1c4ea9cc
chore: update expected output
2020-01-23 11:52:03 -08:00
Leonardo de Moura
4c53dfa8a7
chore: typo
2020-01-22 14:24:32 -08:00
Leonardo de Moura
c9e9208ea2
feat: cleanup bigop example
2020-01-22 14:22:34 -08:00
Leonardo de Moura
c9474c1883
feat: add more examples
...
cc @Kha
2020-01-22 14:09:45 -08:00
Leonardo de Moura
53e64e4e44
test: bigop test
2020-01-22 13:22:29 -08:00
Leonardo de Moura
e8c54ad1bf
fix: use nonReservedSymbol when defining tactic new syntax
2020-01-21 14:37:29 -08:00
Leonardo de Moura
4f0dc252ae
test: add extensible macro example
2020-01-21 14:05:21 -08:00
Leonardo de Moura
2b63aa27d3
chore: use new_frontend in the whole test
2020-01-21 09:16:38 -08:00
Leonardo de Moura
7e61315e6d
chore: fix tests
2020-01-20 22:26:07 -08:00
Leonardo de Moura
47c85cc351
fix: bug at ParserDescr.ident
2020-01-20 21:55:16 -08:00
Leonardo de Moura
1dbfc4b337
fix: add checkNoWsBefore before option * in mkAntiquot
...
@kha we need it, otherwise we can't process rules such as
```
| `(FOO $t >>> $r) => `($t * $r)
```
without adding parenthesis at `(($t) * $r)
2020-01-20 21:48:40 -08:00
Leonardo de Moura
98033f298f
feat: add support for simple category
2020-01-20 20:55:54 -08:00
Leonardo de Moura
c89972b6e2
chore: test
2020-01-20 18:53:54 -08:00
Sebastian Ullrich
129442a76a
fix: syntax: do not qualify fresh kinds
2020-01-20 14:58:58 -08:00
Leonardo de Moura
481665422f
chore: fix test
2020-01-20 14:55:27 -08:00
Leonardo de Moura
4d57790cc5
fix: add workaround for setting correct LBP for $ in antiquotations
2020-01-20 10:42:58 -08:00
Leonardo de Moura
b5fc9c19fe
feat add evalIntros
2020-01-19 17:48:19 -08:00
Simon Hudon
c0a7495495
feat: MonadIO now extends MonadExcept IO.Error
2020-01-19 17:23:37 -08:00
Simon Hudon
bd87ea5d5e
feat: override standard streams
2020-01-19 17:23:12 -08:00
Simon Hudon
7575a32035
feat: add std streams
...
This reverts commit 021ce21d5f70c2efcc58a0588ed6dc4999be6a33.
2020-01-19 17:22:58 -08:00
Leonardo de Moura
81c26214c5
feat: expand repeat
2020-01-19 17:06:19 -08:00
Leonardo de Moura
e931fac3bb
feat: add evalTry
2020-01-19 16:52:39 -08:00
Leonardo de Moura
b94e0381ad
feat: add evalSkip and evalTraceState
2020-01-19 16:37:01 -08:00
Leonardo de Moura
0a3e9abccb
feat: eval apply tactic
2020-01-19 16:23:32 -08:00
Sebastian Ullrich
6e1d70aaf2
feat: elaborate quoted names
2020-01-19 11:58:17 -08:00
Sebastian Ullrich
6c2a2cfa35
feat: support postfix syntax in macro
2020-01-19 11:58:17 -08:00
Sebastian Ullrich
9790b2b390
fix: hygienic mkTermId for constants
2020-01-19 08:28:49 -08:00
Leonardo de Moura
86edc94dbe
feat: add support for elaborating raw literals
2020-01-18 20:02:50 -08:00
Leonardo de Moura
60a9aa52c5
feat: add Array.getSepElems
...
cc @Kha
2020-01-18 19:12:44 -08:00
Leonardo de Moura
3e86608ce2
fix: erase macro scopes from parser categories
2020-01-18 19:10:35 -08:00
Leonardo de Moura
ad72ec4d0d
feat: eval <|> tactic
2020-01-18 18:26:25 -08:00
Leonardo de Moura
66b222879e
feat: eval case tactic
2020-01-18 17:47:43 -08:00
Leonardo de Moura
39dc349167
feat: eval tactic block
2020-01-18 17:22:01 -08:00
Leonardo de Moura
88f5bf8250
feat: evaluate exact tactic
2020-01-18 11:08:16 -08:00
Leonardo de Moura
b2ade985a8
feat: elaborate macro command
2020-01-17 19:52:29 -08:00
Leonardo de Moura
98d9022321
chore: cleanup and new test
2020-01-17 18:07:58 -08:00
Leonardo de Moura
0caa11e242
chore: adjust frontend to new app representation, and fix tests
2020-01-17 17:34:48 -08:00
Leonardo de Moura
f2231ebbc0
feat: improve macro command parser
2020-01-17 09:37:36 -08:00