Leonardo de Moura
05239d20cd
refactor(library/init/lean/ir): split ir.lean
2018-05-01 08:43:34 -07:00
Leonardo de Moura
5a560b6d43
feat(library/init/data): add hashmap
...
We use the same approach used to define rbtree:
1- Structure with minimal number of invariants, AND
2- well_formed inductive predicate
We can use the well_formed predicate to prove auxiliary invariants later.
Example: the keys stored in every bucket have the correct hash code.
This implementation does not depend on the tactic framework,
and it is not a mess like the one in mathlib.
2018-04-30 18:28:29 -07:00
Leonardo de Moura
50b7efe00d
refactor(library/init/data/array/basic): make sure init/data/array/basic does not depend on init.meta
2018-04-30 17:16:45 -07:00
Leonardo de Moura
ba8b85f4c0
chore(library/init/lean/parser/parser): adjust variable names
2018-04-30 16:36:09 -07:00
Leonardo de Moura
485b16a413
feat(library/init/lean/parser/syntax): use position
2018-04-30 16:13:01 -07:00
Leonardo de Moura
9879cb46be
feat(library/init/lean/parser/parser): store offset in error messages
2018-04-30 16:08:52 -07:00
Leonardo de Moura
f20f50254c
feat(library/init/data/string/basic): add string.line_column
2018-04-30 15:55:34 -07:00
Leonardo de Moura
62d425073e
feat(library/init/data/string/basic): add string.iterator.offset
2018-04-30 15:43:51 -07:00
Leonardo de Moura
1b5c3c117e
fix(library/init/lean/parser/syntax): leanchecker error: multiple definitions of lean.parser.position
2018-04-30 13:44:23 -07:00
Leonardo de Moura
3c317a30db
chore(library/init/lean/parser): remove sorry warnings and init/meta dependencies
2018-04-30 13:38:25 -07:00
Leonardo de Moura
4fa43f18dd
chore(library/init/data/rbtree,library/init/data/rbmap): remove auto_param dependency
...
The problem is that `auto_param` is defined in the old `init/meta/name` module,
and we don't want to have `init/meta` dependencies in the `init/lean` modules.
2018-04-30 13:24:13 -07:00
Leonardo de Moura
ead68376b7
chore(library/init/meta): remove @[derive] and mk_has_reflect_instance
2018-04-30 13:12:10 -07:00
Leonardo de Moura
0aceeaf307
chore(library/init/meta): define has_reflect instances manually
2018-04-30 13:10:33 -07:00
Leonardo de Moura
09d3809a42
feat(library/init/lean/name): add has_to_string and has_to_format instances
2018-04-30 12:01:56 -07:00
Leonardo de Moura
2cb6af9769
refactor(library/init/control): remove init.meta.name spurious dependency
2018-04-30 11:36:07 -07:00
Leonardo de Moura
c5abd6868d
feat(library/init/lean/name): add quick_lt
2018-04-30 11:29:26 -07:00
Leonardo de Moura
75a67ceb29
refactor(library/init): move option.lt
2018-04-30 11:19:38 -07:00
Leonardo de Moura
3a494348b6
chore(library/init/lean/parser/macro): remove well_founded_tactics dependency
2018-04-30 11:11:23 -07:00
Leonardo de Moura
0405a67a70
feat(library/init): add wf_term_hack (unsound) axiom
...
We use the axiom instead of `sorry` to avoid a tsunami of warnings.
2018-04-30 11:06:51 -07:00
Leonardo de Moura
5787f17138
chore(library/init): merge sigma/lex.lean with wf.lean
2018-04-30 10:04:03 -07:00
Leonardo de Moura
1ab1b07aec
chore(library/init/data/sigma/lex): remove tactic framework dependency
2018-04-30 09:55:37 -07:00
Leonardo de Moura
0b833f4ee3
chore(library/init): remove classical.lean
...
Now, all axioms are in the `core.lean` file.
2018-04-30 09:25:26 -07:00
Leonardo de Moura
65e3c96b28
chore(library/init): remove sum micro module
2018-04-30 09:25:26 -07:00
Leonardo de Moura
9f18d6545c
chore(library/init): remove funext and quot modules
...
The spaghetti initialization is almost over.
2018-04-30 09:25:26 -07:00
Leonardo de Moura
98a7aab3ac
chore(library/init): remove propext micro module
2018-04-30 09:25:26 -07:00
Leonardo de Moura
eae4483d2a
chore(library/init): remove setoid micro module
2018-04-30 09:25:26 -07:00
Leonardo de Moura
e2abb4ab25
chore(library/init): remove punit micro module
2018-04-30 09:25:26 -07:00
Leonardo de Moura
2503d6026e
chore(library/init): remove prod micro module
2018-04-30 09:25:25 -07:00
Leonardo de Moura
e9d4780ccb
chore(library/init): remove subtype micro module
2018-04-30 09:25:25 -07:00
Leonardo de Moura
9efd07d18c
chore(library/init): move logic.lean => core.lean
2018-04-30 09:25:25 -07:00
Leonardo de Moura
1289037e56
chore(library/init): cleanup
2018-04-30 09:25:25 -07:00
Leonardo de Moura
6ef4806fca
feat(library/init/lean/format): add lean.format
2018-04-29 14:36:49 -07:00
Leonardo de Moura
b39daa40ef
feat(library/init/lean/name): add lean.name
2018-04-29 08:44:58 -07:00
Leonardo de Moura
12f2831f9f
test(tests/lean/parser1): add parser tests
2018-04-28 15:58:50 -07:00
Leonardo de Moura
c9e4c89d9c
chore(library/init/meta): remove mk_dec_eq_instance
...
The tactic mk_dec_eq_instance constructs a function using the brec_on
recursor. The compiler generates horrible code for this kind of
definition. It creates a closure for each recursive call.
Moreover, `brec_on` accumulates all intermediate results.
To generate efficient code, we need to generate a collection of
recursive equations, and then invoke the equation compiler.
cc @kha
2018-04-27 16:13:10 -07:00
Leonardo de Moura
65c7426174
chore(library/init/lean/parser/parser): parser_m ==> parser
...
Use the same name convention used at `init/control`
2018-04-27 13:44:37 -07:00
Leonardo de Moura
1f2f44dc9f
chore(library/init/lean/parser/macro): fix import
2018-04-27 13:42:18 -07:00
Leonardo de Moura
6f0296c757
feat(library/init/lean/parser/parser): add faster take* combinators
...
They are much faster than the more general `many*` combinators.
2018-04-27 13:39:19 -07:00
Leonardo de Moura
21d9409629
feat(library/init/data): modify unit has_to_string and has_repr instances
2018-04-27 13:39:19 -07:00
Leonardo de Moura
3f812698a9
feat(library/init/lean/parser/parser): fast str combinator
2018-04-27 13:39:19 -07:00
Leonardo de Moura
f950965614
fix(library/init/lean/parser/parser): bug
2018-04-27 13:39:19 -07:00
Leonardo de Moura
ba633df7e7
chore(library/init/data): add missing instances
2018-04-27 13:39:19 -07:00
Leonardo de Moura
13ba9ca176
feat(library/init/control/except): add has_repr and has_to_string instances
2018-04-27 13:39:19 -07:00
Sebastian Ullrich
1e53b03aa3
feat(init/parser): add prototype code for syntax trees, macro expansion, and name resolution
2018-04-27 17:57:03 +02:00
Leonardo de Moura
77d3a788e8
refactor(init): init/category ==> init.control
2018-04-27 08:33:08 -07:00
Leonardo de Moura
8b442101af
chore(library/init/lean/parser/parser): add prelude
2018-04-27 08:16:20 -07:00
Leonardo de Moura
0af913c99f
refactor(library/init/data/string): define decidable_eq string instance earlier
2018-04-27 08:16:14 -07:00
Leonardo de Moura
c427fb4086
refactor(*): create library/init/lean folder
...
The new folder will contain the new parser, macro expander and compiler.
This commit also renames the namespace for the old parser `lean3.parser`
2018-04-27 08:02:40 -07:00
Leonardo de Moura
54d89dea4d
feat(library/init/compiler/parser): parsec library on top of string iterators
2018-04-26 20:34:07 -07:00
Leonardo de Moura
9e9a0d103f
feat(library/vm/vm_string): add fast string.iterator.remaining
2018-04-26 18:03:41 -07:00