Commit graph

4115 commits

Author SHA1 Message Date
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
Sebastian Ullrich
ae7df32428 refactor(library/init/lean/parser/syntax): setting source_info.leading is much easier after parsing 2018-09-14 16:33:04 -07:00
Sebastian Ullrich
b95ba21702 chore(library/init/lean/parser): fix syntax_node_kind names 2018-09-14 16:33:04 -07:00
Sebastian Ullrich
0c3a1b07a5 chore(library/init/lean/parser/syntax): hide lean.parser prefix in syntax.to_format 2018-09-14 16:33:04 -07:00
Sebastian Ullrich
5e180cd170 feat(library/init/lean/parser/token): create structure-preserving syntax trees for identifiers
Also generalize `raw_symbol` to `raw`
2018-09-14 16:33:04 -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
Sebastian Ullrich
e6b5598d7b chore(library/init/lean/parser/term): actually remove Type* 2018-09-13 16:38:40 -07:00
Sebastian Ullrich
98e09c274f feat(library/init/lean/parser/{pratt,level}): factor out pratt combinator, implement level parsers 2018-09-13 16:38:40 -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
Sebastian Ullrich
43e57358af refactor(library/module_mgr): minor refactorings 2018-09-11 13:55:25 -07:00
Sebastian Ullrich
af55cb13e7 fix(library/messages,library/init/lean/message): wrap message_log in structure, reverse in the end 2018-09-11 13:55:25 -07:00
Sebastian Ullrich
0d865b37dd feat(library/init/lean/{message,parser}): enhance lean.message
Small regression: order of messages flipped, should eventually be sorted by
position
2018-09-08 18:37:58 -07:00
Leonardo de Moura
71dd8653bc feat(library/init/core): decidable_eq is a proper class
We need this to take advantage of the new indexing structure we are
going to add to improve performance.
2018-09-07 16:38:11 -07:00
Leonardo de Moura
ab9e812ac5 chore(tests/lean): fix tests 2018-09-06 18:09:32 -07:00
Sebastian Ullrich
1a53d4444b feat(library/init/lean/parser): parameterize recursive term parser with rbp 2018-09-06 17:16:22 -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
c121bcf263 chore(tests/lean/smart_unfolding): remove test since it depends on #reduce 2018-09-04 17:22:16 -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
Sebastian Ullrich
93d13ffea3 chore(library/init/lean): lean.parser.reader ~> lean.parser 2018-08-30 16:34:47 -07:00
Sebastian Ullrich
de9d894c14 feat(library/init/lean/parser/reader): use coroutine on the module level 2018-08-29 16:42:24 -07:00
Sebastian Ullrich
2528aee72b refactor(library/init/lean/parser/reader): use different monad stacks for different parts of the reader 2018-08-29 16:42:24 -07:00
Sebastian Ullrich
cec1ee2564 feat(library/init/lean/parser/parsec): reintroduce parsec_t 2018-08-29 16:42:24 -07:00
Sebastian Ullrich
a178f181a8 chore(library/init/lean/parser/macro): remove old name resolution prototype 2018-08-28 13:13:14 -07:00
Sebastian Ullrich
46f734b1b1 refactor(library/init/lean/parser/reader): replace macro with syntax_node_kind
Also make sure that the name inside a node kind is the full name of the
declaration. This way, we cannot have accidentally conflicting node kind names.
2018-08-28 13:13:14 -07:00
Leonardo de Moura
7a47406c4c chore(library/tactic): remove simp_lemmas 2018-08-23 14:10:36 -07:00
Leonardo de Moura
69734dfb3a chore(tests/lean): fix tests 2018-08-23 13:49:07 -07:00
Leonardo de Moura
d0f6bbdf02 chore(tests/lean): replace run_cmd with #eval 2018-08-23 13:32:25 -07:00
Leonardo de Moura
a1fffb2c9d chore(tests/lean/fail/run_command): obsolete test 2018-08-23 13:30:07 -07:00
Sebastian Ullrich
fd1aa589cf chore(tests/lean/reader1): fix test 2018-08-23 11:03:40 -07:00
Sebastian Ullrich
61f8ebf4ef refactor(library/init/lean/parser/reader): destructure reader into monad and has_tokens typeclass 2018-08-23 10:38:59 -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
c69cc61292 feat(frontends/lean,library/init/lean/parser/reader/module): add node_choice! macro
Creates an inductive type from an ordered choice reader
2018-08-22 14:32:03 -07:00
Leonardo de Moura
a968b68942 chore(tests/lean/trace1): fix test
@kha: `trace_root` and `trace_ctx` will probably have to be macros that add
`thunk.mk` for us. The coercion is not applied because the types contain metavariables.
The alternative is to implement a more robust coercion resolution procedure.
2018-08-21 16:21:31 -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