Commit graph

4184 commits

Author SHA1 Message Date
Sebastian Ullrich
11e5d1a8a2 chore(tests/lean/parser1): reintroduce #exit in front of core.lean test 2018-12-06 13:23:25 +01:00
Sebastian Ullrich
143ac0e58a feat(library/init/lean/expander): also normalize bracketed binders in e.g. declarations 2018-12-06 13:23:12 +01:00
Sebastian Ullrich
58def30036 chore(tests/lean/parser1): clearly delimit components in profiler output 2018-12-04 12:31:13 +01:00
Leonardo de Moura
607d22ae58 fix(library/compiler/csimp): bug at float_cases_on_core
The bug occurs when floating `cases_on` application in code of the form
```
let x := C.cases_on ...
in t
```
and when the type of `t` depends on `x`.
The issue here is that the `x` declaration disappears after the float, but the resulting type still depends on it.
We fix the bug by replacing `x` with its value in the type.

cc @kha
2018-11-30 11:40:41 -08:00
Sebastian Ullrich
fd121f03bd feat(library/init/lean/expander): make set of transformers configurable 2018-11-21 18:13:38 +01:00
Sebastian Ullrich
222fff8862 refactor(library/init/lean/elaborator): introduce simple lambda binder 2018-11-21 18:13:38 +01:00
Sebastian Ullrich
6d0b3afa7e fix(library/compiler/compiler): do not silently abort on user-given sorrys 2018-11-17 18:00:55 +01:00
Leonardo de Moura
04227701d6 chore(tests/lean/run): fix the tests
@kha I found the real issue with these two tests.
You have modified the compiler to ignore definitions containing `sorry` :)
2018-11-15 11:21:12 -08:00
Leonardo de Moura
d0ccaa1083 chore(tests/lean): fix tests
TODO: `io` modifications performed yesterday may have affected `eval`.
2018-11-15 10:56:03 -08:00
Leonardo de Moura
c0ac39f7f0 chore(tests/lean/parser1): fix test output 2018-11-12 08:53:57 -08:00
Sebastian Ullrich
bd70dc1fc9 perf(library/init/lean/parser): move backtrackable state from parser_core_t to module_parser_m 2018-11-08 15:58:41 +01:00
Sebastian Ullrich
41f4a34d4b feat(library/init/lean/parser/token): cache hit statistics 2018-11-08 14:52:54 +01:00
Sebastian Ullrich
0026b59a88 fix(tests/lean/macro_scopes): expected output 2018-11-07 09:11:49 +01:00
Leonardo de Moura
f404c5c446 refactor(library/init/data): make sure uint* and usize are irreducible
Remark: this commit breaks the support for `uint*` and `usize` in the old VM.
2018-11-06 16:55:02 -08:00
Sebastian Ullrich
5a286f5e46 test(tests/lean/macro_scopes): macro scopes propagation test 2018-11-06 17:33:16 +01:00
Sebastian Ullrich
090c4c0ce7 feat(library/init/lean/syntax): add lazily propagated macro scopes to syntax_node 2018-11-06 16:46:50 +01:00
Sebastian Ullrich
dcb7566e53 fix(tests/lean/parser1): fix test 2018-11-05 17:40:11 +01:00
Leonardo de Moura
189b037358 chore(tests/lean/run/new_compiler): fix test 2018-10-31 13:25:01 -07:00
Sebastian Ullrich
93fc1fd1de fix(library/init/lean/parser/combinators): node: do not wrap error in first argument 2018-10-30 17:43:05 +01:00
Leonardo de Moura
28a34e798a feat(library/compiler/csimp): projection to field
The new test demonstrations this transformation.
2018-10-28 09:38:45 -07:00
Leonardo de Moura
392f019184 chore(tests/lean/parsec1): fix test 2018-10-23 12:54:29 -07:00
Leonardo de Moura
f7f981285b chore(tests/lean/run/display_hw_term_hack_deps): remove old test 2018-10-23 11:32:56 -07:00
Leonardo de Moura
4cb6b1f9d5 chore(library/tactic): reduce dependencies 2018-10-23 11:32:56 -07:00
Leonardo de Moura
139414b995 chore(tests/lean/parser1): update expected output
cc @kha
2018-10-23 11:32:56 -07:00
Sebastian Ullrich
daf142240b fix(tests/lean/parsec1): fix test 2018-10-19 09:52:01 +02:00
Sebastian Ullrich
db6b9db07e fix(tests/lean/parser1): fix reprinting (`eoi node was missing) 2018-10-15 12:47:32 +02:00
Sebastian Ullrich
758d258210 fix(library/init/lean/parser/term): rename term.ident to ident_univs to remove confusion with ident
`protected` didn't do anything here
2018-10-13 08:11:36 -07:00
Sebastian Ullrich
fdc06b39cd test(tests/lean/parser1): fix reprint check 2018-10-13 08:01:39 -07:00
Leonardo de Moura
aff6d58659 chore(tests/lean/run/new_compiler): fix test 2018-10-10 18:38:18 -07:00
Leonardo de Moura
c74f4c16ca feat(library/kernel,library/compiler/csimp): make sure nat.rec and nat.cases_on reduce when major premise is a nat literal 2018-10-10 18:35:15 -07:00
Leonardo de Moura
338038a05e feat(library/init/core): add inline identity function 2018-10-10 18:17:29 -07:00
Leonardo de Moura
124b4d37fe feat(library/compiler): port simp_inductive to the new compiler stack
This commit also fixes a bug in the old `simp_inductive` module, and
removes now obsolete files (`compiler_step_visitor` and `old_util`).
2018-10-08 16:58:43 -07:00
Sebastian Ullrich
22714b9b10 perf(library/init/lean/parser/combinators): node: no need to fill up with syntax.missing anymore
Views now do iterated pattern matches instead of a single one
2018-10-04 14:27:24 -07:00
Sebastian Ullrich
959948b901 feat(library/init/lean): even more core.lean progress 2018-10-03 16:00:08 -07:00
Sebastian Ullrich
ca8e75be9e fix(library/init/lean/elaborator): check for and consume end of input 2018-10-03 16:00:08 -07:00
Sebastian Ullrich
5274be8c3e feat(library/init/lean/elaborator): local notation
Implemented by treating the parser cfg as a cache that can be recreated from the
elaborator state after e.g. a scope has ended
2018-10-03 16:00:08 -07:00
Sebastian Ullrich
0563c60b1a feat(library/init/lean/elaborator): add coroutine, use it to implement section/namespace elaborators (they don't do anything yet except for checking the end name) 2018-10-02 14:55:28 -07:00
Sebastian Ullrich
097b7be14f refactor(library/init/lean/parser/token): change raw view type to option syntax_atom and create raw_str to give some raw parsers view defaults 2018-10-02 14:55:28 -07:00
Sebastian Ullrich
5596eea27b test(tests/lean/parser1): deactivate core.lean test 2018-10-01 14:38:30 -07:00
Sebastian Ullrich
b443006e8f fix(library/init/lean/parser/syntax): reprint: do not concatenate choice contents 2018-10-01 09:02:39 -07:00
Sebastian Ullrich
945bf39e05 feat(library/init/lean): progress 2018-09-28 20:50:18 -07:00
Sebastian Ullrich
df278096c4 fix(library/init/lean): fixes fixes fixes 2018-09-28 13:08:25 -07:00
Sebastian Ullrich
63201c2a78 feat(library/init/lean/elaborator): add elaborator, elaborate notation and reserve notation 2018-09-28 13:08:24 -07:00
Sebastian Ullrich
1f85d34153 chore(library/init/lean/parser/notation): remove old notation <numeric-literal> := ... syntax 2018-09-28 13:08:24 -07:00
Sebastian Ullrich
2e5ea16e2f perf(library/init/lean/parser): cache consecutive calls to token at the same position
Parser performance improved by about 33%
2018-09-27 16:08:19 -07:00
Leonardo de Moura
8556365e9c chore(tests/lean): remove old tests 2018-09-27 15:19:57 -07:00
Leonardo de Moura
b3451fb682 perf(library/init/lean/parser/parsec): merge ok and ok_eps 2018-09-27 15:14:37 -07:00
Sebastian Ullrich
e661aaeacf refactor(library/init/lean/parser): store registered parsers in configs, use config hierarchy to avoid mutually recursive types
And other refactorings along the way
2018-09-27 10:05:10 -07:00
Sebastian Ullrich
2c07922327 refactor(library/init/lean/parser): minimize parser_state, have the module coroutine take and return parser_config 2018-09-26 13:20:07 -07:00
Sebastian Ullrich
07901fcfcb refactor(library/init/lean/parser/module): put prelude and imports into non-optional header parser to make the life of the elaborator and other consumers a bit easier 2018-09-26 13:20:07 -07:00