Leonardo de Moura
bcb37ef862
feat(runtime): thunk serialization
2018-08-14 15:15:12 -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
Leonardo de Moura
f036a7ad16
chore(runtime/object): mk_thunk(c) should not modify c's RC
...
This is useful when we are generating a function that does not use the
"borrow semantics" for an argument `c` which is used in `mk_thunk(c)`.
2018-08-10 18:11:29 -07:00
Leonardo de Moura
6eb598268d
chore(runtime/object): naming convention
...
`dec_ref` methods assume the input object is *not* a scalar
2018-08-10 18:11:29 -07:00
Leonardo de Moura
ea8e1075d2
feat(runtime/thunk): add runtime support for thunks
...
We did not use constructor objects for implementing thunks because we
wanted to use `atomic<object *>` to implement the cached result.
2018-08-10 18:11:29 -07:00
Sebastian Ullrich
ba7d3ee178
refactor(library/init/lean/parser/{reader/module,syntax}): move new coercions
2018-08-06 15:05:41 -07:00
Sebastian Ullrich
bf043ab8bd
feat(library/init/lean/parser/reader/basic): first has_view prototype, plus prefix ~> notation expansion based on it
2018-08-02 20:35:15 -07:00
Sebastian Ullrich
d4364850ff
feat(library/derive_attribute): support out_params after main parameter
2018-08-02 14:45:37 -07:00
Sebastian Ullrich
dedff7d295
chore(script/prepare-commit-msg): strip 'src/' prefix
2018-08-02 14:45:37 -07:00
Sebastian Ullrich
e535ebcce8
fix(frontends/lean/util): remove reference to obsolete match syntax
2018-08-02 14:16:25 -07:00
Sebastian Ullrich
f52395140a
feat(library/init/lean/parser/parsec): add dbg helper combinator
2018-08-02 13:32:42 -07:00
Sebastian Ullrich
1e1bf4b0f8
feat(library/init/lean/parser/reader/basic): add explicit syntax.missing objects on error
2018-08-02 13:32:28 -07:00
Sebastian Ullrich
10adf10634
fix(library/derive_attribute): prevent infinite loop during parsing
2018-08-02 08:08:21 -07:00
Sebastian Ullrich
eda9e4bb3f
feat(library/derive_attribute): temporary, hacky C++ implementation of @[derive]
2018-08-01 18:44:23 -07:00
Sebastian Ullrich
8033649335
chore(library/util): fix doc
2018-08-01 18:44:23 -07:00
Leonardo de Moura
9d35d31529
refactor(kernel): merge constant_assumption and axiom
2018-08-01 09:57:47 -07:00
Sebastian Ullrich
3951db3b0b
fix(library/init/lean/parser/reader/basic): error recovery reprint issue
2018-07-30 17:55:17 -07:00
Sebastian Ullrich
87dc8adbe6
fix(library/init/lean/parser/parsec): monad_except.catch should not reset position, consumed flag
2018-07-30 17:50:37 -07:00
Sebastian Ullrich
57c25ce01d
feat(src/library/vm/vm): profile: record and display self times
2018-07-30 17:30:20 -07:00
Sebastian Ullrich
8666047703
feat(library/init/lean/parser/reader/module): reserve, mixfix, universe commands
2018-07-30 17:30:20 -07:00
Sebastian Ullrich
1c2ca922af
test(tests/lean/reader1): test for perfect roundtripping
2018-07-30 17:30:20 -07:00
Sebastian Ullrich
3127553e72
chore(script/prepare-commit-msg): filter out .expected.out files
2018-07-30 17:30:20 -07:00
Sebastian Ullrich
242d63af25
fix(library/init/lean/parser/reader/basic): store token start position for perfect roundtripping
2018-07-30 17:30:20 -07:00
Sebastian Ullrich
312de57aec
test(tests/lean/reader1): test error recovery and fix bug
2018-07-30 17:30:20 -07:00
Leonardo de Moura
c0b93d3694
refactor(kernel): remove unnecessary certify_unchecked
2018-07-30 12:54:05 -07:00
Leonardo de Moura
6e5440d49f
test(tests/library/phashtable): add std::unordered_map test
2018-07-30 10:58:22 -07:00
Sebastian Ullrich
0fd9d29ba2
feat(library/init/lean/parser/reader/module): command-level error recovery
2018-07-30 10:38:00 -07:00
Sebastian Ullrich
3728b2ba3f
feat(library/init/lean/parser/reader/basic): add error list handling
2018-07-30 10:38:00 -07:00
Sebastian Ullrich
e34f2e8cd7
chore(library/init/lean/parser): improve error messages
2018-07-30 10:38:00 -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
898e14cdf5
fix(library/init/lean/parser/parsec): orelse: do not backtrack on success
...
This change makes backtracking behavior more predictable and
matches Parsec and Megaparsec's behavior. While the original Parsec paper
motivates the old behavior by arguing it implements the "longest match" rule,
this is obviously only true in a very limited sense.
2018-07-30 10:38:00 -07:00
Sebastian Ullrich
ea2bed7481
feat(library/init/control/combinators): make more universe polymorphic (for e.g. io)
2018-07-30 10:38:00 -07:00
Leonardo de Moura
049a807709
test(tests/library/phashtable): simple performance tests
2018-07-30 10:29:03 -07:00
Gabriel Ebner
73d4a004ac
fix(library/print): add missing break in switch
2018-07-27 16:27:57 -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
0b240cbfe9
feat(library/init/lean/parser/reader/basic): read_m: change custom message type to syntax
2018-07-27 15:27:37 -07:00
Sebastian Ullrich
389e9b7b49
feat(library/init/lean/parser/parsec): use [inhabited μ] instead of unit for custom message type of basic parsers
...
In hindsight, this seems to simplify usage without compromising static typing much
2018-07-27 15:10:20 -07:00
Sebastian Ullrich
046b1890ad
feat(src/frontends/lean/decl_util): ignore out_params when deciding whether to include an anonymous inst implicit section variable
2018-07-27 14:49:09 -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
ad1e72d3e1
fix(library/init/lean/parser/reader/module): fix file
2018-07-27 09:14:11 -07:00
Sebastian Ullrich
f714a6703f
refactor(library/init/lean/parser/reader/module): coercions and notations
2018-07-26 17:28:11 -07:00
Sebastian Ullrich
d526262266
refactor(library/init/lean/parser/reader/basic): rec_t.recurse: clearer implementation
2018-07-26 17:28:11 -07:00
Sebastian Ullrich
669de39df8
refactor(library/init/lean/parser/reader/module): make symbol a local coercion
2018-07-26 17:28:11 -07:00
Leonardo de Moura
95f758d240
feat(library/system/io_interface): improve iterate interface
...
The new version is better for lifting.
2018-07-26 16:07:30 -07:00
Leonardo de Moura
805a5d8180
feat(library/system): fix resulting universe
...
Otherwise we will not be able to implement a mockup implementation in
pure Lean.
2018-07-26 15:59:04 -07:00
Leonardo de Moura
c7762d07c1
feat(library/init/control/lift): add comment
2018-07-26 15:52:47 -07:00
Leonardo de Moura
5d3f421e70
feat(library/init/lean/parser/parsec): avoid unnecessary [alternative m] dependencies
2018-07-26 15:51:00 -07:00
Leonardo de Moura
35b100bb94
feat(library/init/lean/parser/parsec): implement not_followed_by using catch
2018-07-26 15:47:19 -07:00
Sebastian Ullrich
134d27dbec
feat(library/init/lean/parser/parsec): longest_match should return all longest parses
...
In the case of overlapping notations, we will return a choice node of all
possible parses.
2018-07-25 18:07:56 -07:00
Sebastian Ullrich
18b4456a84
Revert "refactor(library/init/lean/parser/parsec): monad_parsec: move from monad_lift/monad_map to direct primitives"
...
This reverts commit 9db0724bf1 .
2018-07-25 13:53:29 -07:00