Commit graph

2121 commits

Author SHA1 Message Date
Leonardo de Moura
4bf41f0036 chore(tests/lean/run/coroutine): fix test 2019-03-21 16:46:53 -07:00
Leonardo de Moura
7bb015c6b3 chore(tests/lean): fix more tests 2019-03-21 15:11:05 -07:00
Leonardo de Moura
2cbdb287c3 chore(tests): fix/disable some tests 2019-03-21 15:11:05 -07:00
Sebastian Ullrich
f34d37c371 chore(tests): port tests, fix at least compiler tests 2019-03-21 15:11:05 -07:00
Sebastian Ullrich
e0bbc094ad chore(library/init): remove coroutines from stdlib 2019-03-08 15:34:17 +01:00
Leonardo de Moura
9cc41c4f3d chore(frontends/lean/inductive_cmds): disable broken check
@kha I have disabled this check. It was implemented 2 years ago by
Daniel, and I don't want to fix it. It seems you have already fixed a
bug there. AFAICT, this check is just for improving error messages.
I believe we may not even need it since the kernel now supports nested
inductive types. AFAIR, Daniel implemented this check here because the
inductive compiler was introducing a lot of auxiliary declarations
that were making the kernel error messages unreadable.
2019-03-04 11:05:21 -08:00
Leonardo de Moura
7e8f9e6f66 feat(library/compiler): add [extern] attribute 2019-02-09 18:53:44 -08:00
Sebastian Ullrich
4c0f836305 chore(shell/lean): reduce lean interface to taking a single file, assuming all dependencies have already been built 2019-01-25 18:27:38 +01:00
Leonardo de Moura
c3dfb613d5 test(tests/lean/run/rc_tests): basic explicit_rc_fn tests 2019-01-17 15:25:27 -08: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
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
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
Leonardo de Moura
189b037358 chore(tests/lean/run/new_compiler): fix test 2018-10-31 13:25:01 -07: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
f7f981285b chore(tests/lean/run/display_hw_term_hack_deps): remove old test 2018-10-23 11:32:56 -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
Leonardo de Moura
b3451fb682 perf(library/init/lean/parser/parsec): merge ok and ok_eps 2018-09-27 15:14:37 -07:00
Leonardo de Moura
017261960c feat(library/compiler/csimp): add float_cases_on 2018-09-24 18:10:26 -07:00
Leonardo de Moura
52d1abf0bc feat(library/compiler): add cse to new compiler stack 2018-09-14 17:48:18 -07:00
Leonardo de Moura
e8ab46619b chore(tests/lean/run/new_compiler): fix test 2018-09-14 16:42:53 -07:00
Leonardo de Moura
7174d53820 feat(library/compiler/csimp): distribute application over cases 2018-09-14 15:14:40 -07:00
Leonardo de Moura
31a9a22641 test(tests/lean/run/new_compiler): add test 2018-09-14 13:35:41 -07:00
Leonardo de Moura
5ed05db261 test(tests/lean/run/new_compiler): add test for new compiler stack 2018-09-14 09:46:02 -07:00
Leonardo de Moura
afd54039ab chore(library): remove >>, we should use *> 2018-09-12 17:31:21 -07:00
Leonardo de Moura
9e305a5f26 chore(library): remove return, we should use pure 2018-09-12 16:51:11 -07:00
Leonardo de Moura
ab9e812ac5 chore(tests/lean): fix tests 2018-09-06 18:09:32 -07:00
Leonardo de Moura
208b932583 feat(library/constructions/brec_on): add brec_on and binduction_on for new inductive datatype module
We don't support these constructions for nested inductive types, but we
do for mutual inductives.
2018-09-05 14:46:03 -07:00
Leonardo de Moura
f335623530 feat(library/constructions/brec_on): add below and ibelow for new inductive datatype module 2018-09-05 14:46:03 -07:00
Leonardo de Moura
afb9584a63 feat(kernel): store at inductive_val whether the type is reflexive or not 2018-09-05 14:46:03 -07:00
Leonardo de Moura
4964ad660f feat(library/constructions/no_confusion): add no_confusion for new inductive datatype module 2018-09-05 10:27:49 -07:00
Leonardo de Moura
4773a3be5f feat(library/constructions/no_confusion): add no_confusion_type for new inductive datatype module 2018-09-05 09:55:13 -07:00
Leonardo de Moura
cc5f60c28d test(tests/lean/run/new_inductive): add new tests 2018-09-04 18:17:13 -07:00
Leonardo de Moura
d8e7941116 feat(library/constructions/rec_on): add rec_on for new inductive datatype module 2018-09-04 17:22:16 -07:00
Leonardo de Moura
0f207380c7 test(tests/lean/run/new_inductive): add test for new inductive datatype module 2018-09-04 10:35:28 -07:00
Leonardo de Moura
69734dfb3a chore(tests/lean): fix tests 2018-08-23 13:49:07 -07:00
Sebastian Ullrich
adfc8c9e62 chore(tests/lean/run/deriv): fix test 2018-08-23 10:38:59 -07:00
Sebastian Ullrich
6009279ab3 fix(library/compiler/cse): deactivate CSE for constructor applications
Fixes 1968
2018-08-22 14:32:03 -07:00
Sebastian Ullrich
6dbe54a01b chore(library/init/io): rename io.print_ln to io.println 2018-08-21 08:43:10 -07:00
Sebastian Ullrich
3516c37ec9 feat(library/init/control/coroutine_io): coroutine_io 2018-08-21 08:43:10 -07:00
Sebastian Ullrich
6b55e24ab7 feat(library/init/{io,control/except}): use lift_t to automatically upcast io and other errors 2018-08-21 08:43:09 -07:00
Sebastian Ullrich
9db688f4c2 fix(library/{vm/vm_io,init/io}): fix bugs and tests 2018-08-21 08:43:09 -07:00
Sebastian Ullrich
37e5f03351 refactor(library/system/io): move into init 2018-08-21 08:43:09 -07:00
Leonardo de Moura
8a96fde229 feat(library/init/control/coroutine): add coroutine
Remark: the termination proofs are commented because Lean 4 is
currently ignoring them and accepting non-terminating functions.

These files are based on an experiment implemented using Lean 3.
We can find it here:
https://gist.github.com/leodemoura/f5d82426c105b5fae0880e77024f6e9c

We will use coroutines to implement the interaction between reader,
elaborator and main driver.
2018-08-12 17:14:02 -07:00
Sebastian Ullrich
2823bebd23 refactor(library/init/lean/parser/parsec): message.pos: replace with iterator
This allows efficient recovery from a parse error as well as implementing
`has_to_string` for `message`
2018-07-30 10:38:00 -07:00
Sebastian Ullrich
10b18e77a1 feat(library/init/lean/parser/reader/basic): combinators: create partial syntax trees 2018-07-27 16:19:02 -07:00