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
Sebastian Ullrich
65fd050b83
feat(library/init/lean/parser/parsec): add custom error message type
2018-07-27 14:29:50 -07:00
Sebastian Ullrich
72b255d4e1
chore(library/init/lean/parser/parser_t): rename module and type to parsec to avoid nested use of parser
2018-07-12 10:35:20 +02:00
Sebastian Ullrich
e57117a9b3
chore(library/init/lean/parser/parser_t): revert introduction of parser_t
2018-07-11 18:44:04 +02:00
Sebastian Ullrich
f31e5f407f
chore(tests/lean/run/handlers): fix test
2018-06-29 16:39:47 +02:00
Sebastian Ullrich
7ae87705c2
feat(library/init/lean/parser/parser_t): introduce monad_parser
2018-06-15 17:48:20 +02:00
Leonardo de Moura
71fc35af1d
chore(library/vm): remove meta rb_map
...
We should use the non-meta rbmap that is implemented in Lean.
2018-06-14 17:34:43 -07:00
Leonardo de Moura
1bae8f8eab
refactor(library/init/lean/ir/parser): parser.lean => parser_t.lean
2018-06-05 08:00:13 -07:00
Sebastian Ullrich
0f7c0ac8bf
feat(init/lean/parser/parser): make a monad transformer
...
Also move parser combinators into the more specific namespace `init.lean.parser.parser_t`.
2018-06-04 12:57:23 +02:00
Leonardo de Moura
3df91f1567
chore(*): fix tests
2018-05-21 06:57:43 -07:00
Leonardo de Moura
ce1fabbf3b
chore(tests/lean): fix tests
2018-05-20 09:47:31 -07:00
Leonardo de Moura
d92679f969
refactor(*): replace name with lean.name
2018-05-20 09:42:44 -07:00
Leonardo de Moura
0f2a8f09c2
chore(library/init/lean/ir): cleanup
2018-05-15 12:09:04 -07:00
Leonardo de Moura
5cfb442f2c
feat(library/init/lean/ir): add compilation unit initializer/finalizer
2018-05-15 11:57:53 -07:00
Sebastian Ullrich
839e65f27c
test(tests/lean/run/handlers): add "Handlers in Action" example implementation
2018-05-15 18:50:12 +02:00
Leonardo de Moura
31ce1a23e7
fix(library/init/lean/ir/extract_cpp): add support for bignum literals
2018-05-14 11:12:49 -07:00
Leonardo de Moura
37201b9192
feat(library/init/lean/ir/extract_cpp): add emit_closure
2018-05-14 09:53:45 -07:00
Leonardo de Moura
ba76d86a38
feat(library/init/lean/ir/extract_cpp): add emit_app, fix assignment
2018-05-14 09:28:17 -07:00
Leonardo de Moura
12854dc944
feat(library/init/lean/ir/extract_cpp): include uncurry
2018-05-13 14:47:54 -07:00
Leonardo de Moura
c00117a269
fix(library/init/lean/ir/ssa_check): bug
2018-05-13 14:43:13 -07:00
Leonardo de Moura
8b0a35fa5d
feat(library/init/lean/ir/extract_cpp): add uncurry for functions with many arguments
2018-05-13 13:28:18 -07:00
Leonardo de Moura
b7f194d389
feat(library/init/lean/ir): allow arbitrary C++ identifiers to be assigned to declarations
2018-05-13 11:04:42 -07:00
Leonardo de Moura
cfacb515c1
feat(library/init/lean/ir): add IR simple frontend
2018-05-13 10:45:26 -07:00
Leonardo de Moura
224fdc7a78
refactor(library/init/lean/ir): platform dependent IR
...
Motivation: in 64-bit machines, we can store boxed uint32 values as a
tagged pointer. In 32-bit machines, we need to allocated an object (like
Haskell) to store the uint32 value. So, the generated bytecode is quite
different in each platform.
This change also allow us to simplify the IR. Example: we don't need the
type `sizet` anymore.
Impact: To be able to bootstrap in both platforms,
we will have to store two versions of the generated code: 32 and 64
versions. In principle, we only need to store the 64-bit version,
and use cross-compilation to build the 32-bit version.
2018-05-10 13:15:02 -07:00