Sebastian Ullrich
040ec9767d
fix(library/init/lean/parser/combinators): (x) -> e should not be a dependent function
2019-03-26 11:26:39 +01:00
Leonardo de Moura
3befc219c9
chore(library/init): Empty => empty when it is a function
2019-03-21 17:03:15 -07:00
Leonardo de Moura
2be87ecd92
chore(library/init): Bool.tt => Bool.true and Bool.ff => Bool.false
2019-03-21 15:06:44 -07:00
Leonardo de Moura
04e20623e6
chore(*): use lowercase dir names
2019-03-21 15:06:44 -07:00
Leonardo de Moura
67fb78bb47
chore(*): renaming files
2019-03-21 15:06:44 -07:00
Sebastian Ullrich
beda5f5f43
chore(library): capitalize types and namespaces
2019-03-21 15:06:43 -07:00
Sebastian Ullrich
b939162168
chore(library): switch from snake_case to camelCase
2019-03-21 15:06:43 -07:00
Sebastian Ullrich
4b3995fac3
refactor(library/init/lean/parser/term): factor out opt_type parser
2018-12-06 13:23:12 +01:00
Sebastian Ullrich
d9dc4edd31
refactor(library/init/lean/parser/combinators): improve sep_by view
2018-11-27 17:11:14 +01:00
Sebastian Ullrich
c8eaee74b4
feat(frontends/lean,library/init/lean/parser/combinators): add node_longest_choice! macro
2018-11-19 18:02:28 +01:00
Leonardo de Moura
7937f1e010
chore(library/init/util): remove util.lean
...
At least initially, we will not support these primitives in the new compiler.
2018-11-15 16:27:52 -08:00
Sebastian Ullrich
d77c6169f4
chore(library/init/lean/parser/combinators): node: small simplification
2018-11-08 10:43:17 +01:00
Sebastian Ullrich
090c4c0ce7
feat(library/init/lean/syntax): add lazily propagated macro scopes to syntax_node
2018-11-06 16:46:50 +01:00
Sebastian Ullrich
8c27f0aac6
refactor(frontends/lean/elaborator,library/init/lean): finish no_kind refactoring
2018-11-04 20:24:40 +01:00
Sebastian Ullrich
93fc1fd1de
fix(library/init/lean/parser/combinators): node: do not wrap error in first argument
2018-10-30 17:43:05 +01:00
Sebastian Ullrich
74bd182bc8
perf(library/init/lean/parser/combinators): make node semireducible
2018-10-30 17:43:05 +01:00
Sebastian Ullrich
0d7ea62f9a
perf(frontends/lean/elaborator,library/init/lean): put out_params first to benefit from instance pre-filtering
2018-10-30 17:43:05 +01:00
Leonardo de Moura
89afabae29
refactor(library/init/lean/parser/parsec): make sure custom error message doesn't need to be inhabited
2018-10-21 10:57:23 -07:00
Leonardo de Moura
88de81077c
feat(library/compiler/specialize): do not specialize instances unless they are marked with [specialize]
...
@kha: I changed the specialization candidate selection procedure.
Now, instances are not considered for specializations unless we mark
them with `[specialize]`. The idea is that an instance application is
morally just creating the "dictionary" for invoking a polymorphic
function.
2018-10-15 18:29:29 -07:00
Leonardo de Moura
4cfe44bed0
feat(library/compiler/specialize): add nospecialize attribute
...
@kha I had to add this attribute because the specializer was generated
many specialization candidates for functions that take `[has_tokens ...]`
as an argument. Moreover, these candidates had a lot of
dependencies. I am trying to workaround this issue by marking the
instances with the new attribute `[nospecialize]`.
I did not mark instances created by `[derive]`. It is quite tedious to
do it.
BTW, when I was investigating the problem I stumbled at `node.view`.
Its type is:
```
node.view :
Π {α : Type} {m : Type → Type} [_inst_1 : monad m] [_inst_2 : monad_except (parsec.message syntax) m]
[_inst_3 : monad_parsec syntax m] [_inst_4 : alternative m] (k : syntax_node_kind) (rs : list (m syntax))
[i : @has_view syntax_node_kind k α], @has_view (m syntax) (@node m _inst_1 _inst_2 _inst_3 _inst_4 k rs) α
```
This looks wrong: the view depends on `[monad_parsec syntax m]`
We should also make sure definitions do not have unnecessary type
class instances. Otherwise, we will put additional stress on the code
specializer. One option is to change the frontend and filter unused
instances.
2018-10-15 17:44:26 -07:00
Leonardo de Moura
15a25d5aa9
chore(library/init/lean/parser): add a few comments
2018-10-11 15:54:57 -07:00
Sebastian Ullrich
22714b9b10
perf(library/init/lean/parser/combinators): node: no need to fill up with syntax.missing anymore
...
Views now do iterated pattern matches instead of a single one
2018-10-04 14:27:24 -07:00
Sebastian Ullrich
b443006e8f
fix(library/init/lean/parser/syntax): reprint: do not concatenate choice contents
2018-10-01 09:02:39 -07:00
Sebastian Ullrich
203545ce99
chore(library/init/lean/parser/trie): add debug print
...
Also make sure it's in the prelude, whoops
2018-09-28 13:08:24 -07:00
Sebastian Ullrich
e661aaeacf
refactor(library/init/lean/parser): store registered parsers in configs, use config hierarchy to avoid mutually recursive types
...
And other refactorings along the way
2018-09-27 10:05:10 -07:00
Sebastian Ullrich
32f4d52e1c
refactor(library/init/lean): revert introduction of tysyntax; push syntax.missing through views
2018-09-24 18:24:27 -07:00
Sebastian Ullrich
ed0a8a8827
feat(library/init/lean/parser/combinators): make optional's view default to none
2018-09-24 09:53:28 -07:00
Sebastian Ullrich
41c0bc87fd
refactor(library/init/lean/parser): make views shallow via tysyntax
2018-09-22 21:24:38 -07:00
Sebastian Ullrich
64a5d0f240
refactor(library/init/lean/parser): has_tokens default
2018-09-20 09:38:10 -07:00
Sebastian Ullrich
c7c459d47b
Revert "perf(library/init/lean/parser): collect tokens in trie instead of list, do not inline"
...
This reverts commit e4c50b2b09 .
Lists are efficient enough and make it easier to customize the trie construction.
Keep the `donotinline` though.
2018-09-20 09:38:10 -07:00
Sebastian Ullrich
e4c50b2b09
perf(library/init/lean/parser): collect tokens in trie instead of list, do not inline
2018-09-19 12:36:34 -07:00
Sebastian Ullrich
fa0148e5b8
feat(library/init/lean/parser): declarations and binders
2018-09-17 18:47:50 -07:00
Sebastian Ullrich
6b28162eee
chore(library/init/lean/parser/combinators): move out combinators
2018-09-17 18:47:50 -07:00