Leonardo de Moura
49c5c5c08a
fix: horrible error message due to constApprox := true
...
The new test `typeMismatch.lean` contains two examples where the error
message was dreadful.
2020-09-29 07:54:48 -07:00
Leonardo de Moura
a0a724ddbd
fix: tests and elabDo
2020-09-26 19:12:01 -07:00
Leonardo de Moura
0abca5475f
refactor: move ppExpr to IO
...
@Kha I am also tracking `currNamespace` and `openDecls`.
BTW, I also tried an experiment where I added `currNamespace` and
`openDecls` to `Meta.Context`, but it looked weird. This information
is only needed in the elaborator and pretty printer.
The `PPContext` object should contain everything you need. You
can put `currNamespace` and `openDecls` in the `Delaborator.Context`.
2020-09-15 18:48:21 -07:00
Leonardo de Moura
c080d42692
chore: move tests to new frontend
2020-09-13 10:16:15 -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
44f5182f76
chore: fix tests
...
We have removed `MetaIO`. We use use `CoreM` instead.
2020-08-20 15:56:29 -07:00
Leonardo de Moura
c6e7ea8fd5
feat: add ParserDescr.parser constructor for embedding parser definitions into parser descriptions
2020-06-16 14:06:46 -07:00
Leonardo de Moura
f61e4ffbbd
chore: ParserDescr.parser ==> ParserDescr.cat
2020-06-16 13:40:16 -07:00
Leonardo de Moura
f92166e913
chore: fix test
2020-06-10 16:43:44 -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
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
Sebastian Ullrich
60ac03916e
feat: introduce anonymous antiquotations for all categories
2020-05-26 14:32:42 +02:00
Leonardo de Moura
21618361b7
refactor: remove ParserKind
2020-01-30 20:56:46 -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
b14c7cb69b
feat: allow user to set nodeKind at syntax command
2020-01-14 18:51:31 -08:00
Leonardo de Moura
1e8291bf7e
chore: fix test
2020-01-14 18:43:58 -08:00
Leonardo de Moura
246e0a5532
fix: propagate type before synthesizeSyntheticMVars
2020-01-11 12:01:12 -08:00
Leonardo de Moura
e817257922
feat: elaborate declare_syntax_cat
...
TODO: `registerParserCategory` uses `registerAttribute` which relies
on the environment having a declaration of type `AttributeImpl`.
This is bad since forces users to import `Init.Lean`.
@Kha The key problem is that we cannot serialize `AttributeImpl`.
I will try to address this issue tomorrow. I am considering different
workarounds.
2020-01-10 21:10:02 -08:00
Leonardo de Moura
f73ff914eb
feat: extensible elaboration functions
...
@kha `termParserAttr.lean` has a small example
2020-01-10 15:05:14 -08:00
Leonardo de Moura
65370e9322
chore: restore disabled tests
2020-01-08 21:24:01 -08:00
Leonardo de Moura
760f8aa013
chore: fix tests
2020-01-08 21:09:17 -08:00
Leonardo de Moura
bc7455e04e
refactor: CommandElabM and FrontendM in IO
2020-01-03 18:15:45 -08:00
Leonardo de Moura
434c148800
test: add termElab attribute test
2020-01-01 14:16:49 -08:00