Leonardo de Moura
e58949e938
chore(library/init/control/id): rename id monad to Id
2019-03-29 16:45:52 -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
Leonardo de Moura
ecdb9d6df0
feat(library/init, frontends/lean): add abbreviation for abbreviation
2019-03-15 16:01:25 -07:00
Leonardo de Moura
a78c773f37
feat(library/init/lean): unsafe support in the new frontend
2019-03-15 15:49:03 -07:00
Sebastian Ullrich
6f83faaee0
perf(library/init/lean/parser/command): index command parsers by first token
2019-03-07 11:28:42 +01:00
Sebastian Ullrich
c22fbb5cde
feat(library/init/lean,frontends/lean/vm_elaborator): set_option
2019-01-20 18:21:41 +01:00
Sebastian Ullrich
8cc35b854b
feat(library/init/lean/{expander,elaborator}): variable(s)
2019-01-17 17:06:52 +01:00
Sebastian Ullrich
d0062691de
feat(library/init/lean): implement init_quot
2019-01-15 15:06:51 +01:00
Sebastian Ullrich
4f7be93e87
feat(library/init/lean): remove support for section aliases
2018-12-18 17:04:04 +01:00
Sebastian Ullrich
306da89551
feat(library/init/lean/expander): expand universe( variable)s to multiple universe( variable) commands
2018-12-07 10:31:14 +01:00
Leonardo de Moura
1cb22b6801
perf(library/init/lean/parser/command): move common command parsers to the beginning of the list
...
@kha This modification saved 150k object allocations on my machine.
BTW, the function
```
def command_parser.run (commands : list command_parser) (p : command_parser)
: parser_t command_parser_config id syntax :=
λ cfg, (p.run cfg).run_parsec $ λ _, any_of $ commands.map (λ p, p.run cfg)
```
is also affected by the problem I described at Zulip. It is another
example where eager eta-expansion is bad. Every time we call it, we
will create approx. 20 closures and 20 cons memory cells. We have at
least 600 commands in core.lean. So, just the `map` nested there will
generate 24k memory allocations. Moreover, the problem will get worse as we add
more commands.
2018-11-08 14:45:34 -08:00
Sebastian Ullrich
959948b901
feat(library/init/lean): even more core.lean progress
2018-10-03 16:00:08 -07:00
Sebastian Ullrich
5274be8c3e
feat(library/init/lean/elaborator): local notation
...
Implemented by treating the parser cfg as a cache that can be recreated from the
elaborator state after e.g. a scope has ended
2018-10-03 16:00:08 -07:00
Sebastian Ullrich
b8b39585ec
fix(library/init/lean/parser/command): variable may take unbracketed binder
2018-10-02 14:55:28 -07:00
Sebastian Ullrich
945bf39e05
feat(library/init/lean): progress
2018-09-28 20:50:18 -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
76ea8169bc
feat(library/init/lean/expander): prefix ~> notation macro: construct RHS, move to new module
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
fa0148e5b8
feat(library/init/lean/parser): declarations and binders
2018-09-17 18:47:50 -07:00
Sebastian Ullrich
a6f25e2ae7
refactor(library/init/lean/parser/token): id ~> ident, ident ~> ident.parser
2018-09-17 18:47:50 -07:00
Sebastian Ullrich
ea4d7af66d
refactor(library/init/lean/parser/command): move out notations
2018-09-17 18:47:50 -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
8aa621efb2
refactor(library/init/lean/{syntax,macro}): remove syntax.ident, simply syntax.atom, remove expander prototype
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
Sebastian Ullrich
6c11f99aae
fix(library/init/lean/parser): do not use raw_symbol on keywords
...
Otherwise `Type (maxx u v)` would be parsed as `Type (max x u v)`
2018-09-14 16:33:04 -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
Sebastian Ullrich
a57573a5b7
fix(library/init/lean/parser/command): keywords in notation actions are not actual keywords
2018-09-13 16:38:40 -07:00
Sebastian Ullrich
1a53d4444b
feat(library/init/lean/parser): parameterize recursive term parser with rbp
2018-09-06 17:16:22 -07:00
Sebastian Ullrich
149dd2a5e3
refactor(library/init/lean/parser): move command parsers into separate file
2018-09-06 10:46:29 -07:00