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
b7f7f257c5
feat(library/init/lean/parser/declaration): inductive, structure
2018-09-20 09:38:10 -07:00
Leonardo de Moura
f640b1bbac
feat(library/init/lean/ir/extract_cpp): missing inlines
2018-09-20 08:39:25 -07:00
Leonardo de Moura
a3a8165388
feat(library/init/control/monad): provide seq_right default implementation for monad
...
It was using the `seq_right` from `applicative` which is
```
(seq_right := λ α β a b, const α id <$> a <*> b)
```
and horrible code was being generated.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2018-09-20 08:39:25 -07:00
Leonardo de Moura
5ff9e24b17
feat(library/init/control): do not use unnecessary structures
...
It confuses the compiler.
2018-09-20 08:39:25 -07:00
Leonardo de Moura
28877282ce
fix(library/init/function): missing @[inline]
2018-09-20 08:39:25 -07:00
Sebastian Ullrich
623a6603cb
feat(library/init/lean/parser/term): lambda, pi, arrow
2018-09-19 12:36:34 -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
e3afe02786
feat(library/init/lean/parser/declaration): doc comments and axioms
2018-09-19 12:36:34 -07:00
Sebastian Ullrich
80e37aa8c5
chore(library/init/lean/parser): improve error messages
2018-09-19 12:36:34 -07:00
Leonardo de Moura
11f98a409e
chore(library/init/control/except): missing @[inline] annotations
2018-09-19 09:13:49 -07:00
Leonardo de Moura
d3e225ec65
fix(library/init): missing @[inline]
2018-09-18 21:42:22 -07:00
Leonardo de Moura
54f04dca9f
feat(library/init/core): use cases_on instead of rec_on
2018-09-18 15:25:15 -07:00
Leonardo de Moura
2a13ea484e
chore(library/init/lean/ir/extract_cpp): add space
2018-09-18 08:23:32 -07:00
Sebastian Ullrich
1f239c9f2a
feat(library/init/lean/parser/syntax): pretty-print ident nodes
...
Painfully, because `ident.view` is not defined yet
2018-09-17 18:47:50 -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
6b28162eee
chore(library/init/lean/parser/combinators): move out combinators
2018-09-17 18:47:50 -07:00
Sebastian Ullrich
7012583245
feat(library/init/lean/parser/term): universes on identifiers
2018-09-17 18:47:50 -07:00
Leonardo de Moura
4fd2e71bc9
chore(library/init/data/ordering/basic): mark cmp_using as [inline]
2018-09-17 14:56:31 -07:00
Leonardo de Moura
b07c718425
refactor(library/init/core): change ite signature
2018-09-17 14:27:28 -07:00
Leonardo de Moura
871e7de673
chore(library/init/core): move auxiliary constants to beginning of the file
2018-09-16 11:02:17 -07:00
Sebastian Ullrich
906f59e16e
fix(library/init/lean/parser/token): token': do not ignore source_info
2018-09-14 16:33:04 -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
b95ba21702
chore(library/init/lean/parser): fix syntax_node_kind names
2018-09-14 16:33:04 -07:00
Sebastian Ullrich
0c3a1b07a5
chore(library/init/lean/parser/syntax): hide lean.parser prefix in syntax.to_format
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
468ac814a7
perf(library/init/lean/parser/token): move number' out of longest_match call
2018-09-14 16:33:04 -07:00
Sebastian Ullrich
123adc1ae2
fix(library/init/lean/parser/parsec): longest_match: do not consume if no parser consumed
2018-09-14 16:33:04 -07:00
Sebastian Ullrich
384389c84b
refactor(library/init/lean/parser/basic): move out rec_t and trie
2018-09-14 16:33:04 -07:00
Sebastian Ullrich
6733d5ab21
feat(library/init/lean/parser/token): comments are not tokens anymore
2018-09-14 16:33:04 -07:00
Sebastian Ullrich
fea637288d
fix(library/init/data/nat/basic,library/vm/vm_nat): regression in old compiler: primitive for nat equality was ignored
...
Improves parser performance by 26%
2018-09-14 16:33:04 -07:00
Leonardo de Moura
4874e25715
feat(kernel): save constructor idx and nfields at constructor_val
2018-09-14 13:45:58 -07:00
Sebastian Ullrich
e6b5598d7b
chore(library/init/lean/parser/term): actually remove Type*
2018-09-13 16:38:40 -07:00
Sebastian Ullrich
ce5618d332
chore(library/init/lean/parser/term): remove Sort*, Type*
...
These can be macros
2018-09-13 16:38:40 -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
Leonardo de Moura
78317c5062
chore(library/init/control/combinators): remove dead notation
2018-09-12 17:34:25 -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
9f2d543209
chore(library/init/core): hide arguments for lc_proof, lc_cast and lc_unreachable
2018-09-12 11:00:05 -07:00
Leonardo de Moura
d5d926b0ef
feat(library/compiler/lcnf): eliminate no_confusion
2018-09-12 10:40:09 -07:00
Leonardo de Moura
9b21287a3e
feat(library/compiler/lcnf): add lean compiler normal form
2018-09-11 18:10:10 -07:00
Leonardo de Moura
efb33ac0a7
chore(library/init/env_ext): update
2018-09-11 13:55:25 -07:00
Sebastian Ullrich
af55cb13e7
fix(library/messages,library/init/lean/message): wrap message_log in structure, reverse in the end
2018-09-11 13:55:25 -07:00
Sebastian Ullrich
99ab0e9d67
refactor(library/messages): make an object_ref
2018-09-11 13:55:25 -07:00