Sebastian Ullrich
e7a6746b6a
refactor(library/init/lean): share error function between expander and elaborator
2018-12-06 17:03:01 +01:00
Sebastian Ullrich
11e5d1a8a2
chore(tests/lean/parser1): reintroduce #exit in front of core.lean test
2018-12-06 13:23:25 +01:00
Sebastian Ullrich
9c9e642210
feat(library/init/lean/elaborator): universe operators, subtype
2018-12-06 13:23:12 +01: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
8d3c0d4889
feat(library/init/lean/elaborator): also check to_pexpr on decl types
2018-12-06 13:23:12 +01:00
Sebastian Ullrich
ac1bb5dfb0
feat(library/equations_compiler/wf_rec): eta-expand unapplied recursive calls
2018-12-06 13:23:12 +01:00
Sebastian Ullrich
143ac0e58a
feat(library/init/lean/expander): also normalize bracketed binders in e.g. declarations
2018-12-06 13:23:12 +01:00
Sebastian Ullrich
cf1aa13a2c
feat(library/init/lean/elaborator): to_pexpr: translate match nodes to pre_equations pexpr
...
Building a proper `equations` pexpr in Lean is not feasible right now because we
need global+local name resolution, [pattern] attribute retrieval, ... to
reimplement `patexpr_to_pattern`. The `pre_equations` will instead be converted
by the old elaborator using this function (TBD).
With this change, `to_pexpr` can now translate every basic definition body in
`core.lean`.
2018-12-05 12:57:41 +01:00
Sebastian Ullrich
79b7a29d3f
fix(library/init/lean/parser/syntax): syntax.to_format: reverse scope stack
2018-12-04 13:44:46 +01:00
Sebastian Ullrich
ad27da3209
perf(library/init/lean/parser/syntax): optimize syntax.flip_scopes
2018-12-04 13:16:45 +01:00
Sebastian Ullrich
58def30036
chore(tests/lean/parser1): clearly delimit components in profiler output
2018-12-04 12:31:13 +01:00
Leonardo de Moura
607d22ae58
fix(library/compiler/csimp): bug at float_cases_on_core
...
The bug occurs when floating `cases_on` application in code of the form
```
let x := C.cases_on ...
in t
```
and when the type of `t` depends on `x`.
The issue here is that the `x` declaration disappears after the float, but the resulting type still depends on it.
We fix the bug by replacing `x` with its value in the type.
cc @kha
2018-11-30 11:40:41 -08:00
Leonardo de Moura
eae421c506
feat(library/compiler/llnf): explicit_rc skeleton
2018-11-28 15:44:55 -08:00
Leonardo de Moura
05d25d92c0
feat(library/compiler): only create _boxed version if needed
2018-11-28 09:46:48 -08:00
Sebastian Ullrich
c3f8e219c0
feat(library/init/lean/expander): preresolve global references (not actually used anywhere yet)
2018-11-27 18:02:51 +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
ba0feb5daa
chore(library/init/lean/expander): comments, minor refactoring
2018-11-27 16:35:20 +01:00
Sebastian Ullrich
89b67a0367
fix(library/init/lean/expander): mk_notation_transformer: reverse substitution list
2018-11-23 17:36:34 +01:00
Sebastian Ullrich
ee9c26947c
feat(library/init/lean/elaborator): structure instances
2018-11-22 17:28:19 +01:00
Sebastian Ullrich
5043a6b9b3
feat(library/init/lean/{expander,elaborator}): show, let, choice
2018-11-22 17:25:46 +01:00
Sebastian Ullrich
7003fb6447
feat(library/init/lean/expander): command-level notations
2018-11-21 18:13:38 +01:00
Sebastian Ullrich
fd121f03bd
feat(library/init/lean/expander): make set of transformers configurable
2018-11-21 18:13:38 +01:00
Sebastian Ullrich
32e3e8a336
feat(library/init/lean/elaborator): sort_app, explicit
2018-11-21 18:13:38 +01:00
Sebastian Ullrich
d1098534b2
feat(library/init/lean/expander): arrow, if
2018-11-21 18:13:38 +01:00
Sebastian Ullrich
cc93a2eb89
feat(library/init/lean/expander): extend "simple binders" to pi, expand pi
2018-11-21 18:13:38 +01:00
Sebastian Ullrich
a4b9cc83b8
feat(library/init/lean/{expander,elaborator}): progress
2018-11-21 18:13:38 +01:00
Sebastian Ullrich
222fff8862
refactor(library/init/lean/elaborator): introduce simple lambda binder
2018-11-21 18:13:38 +01:00
Sebastian Ullrich
8763e66f30
feat(library/init/lean/expander): allow macros not to unfold
2018-11-19 18:47:17 +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
Sebastian Ullrich
4ec98a4595
feat(library/init/lean/expander): unfold lambdas into normal form
2018-11-19 17:27:01 +01:00
Sebastian Ullrich
7d7d15f8f7
chore(frontends/lean/elaborator): improve error positions
2018-11-19 15:28:23 +01:00
Sebastian Ullrich
774d776133
feat(frontends/lean/builtin_exprs): pattern let with type
2018-11-19 14:15:25 +01:00
Sebastian Ullrich
d10ff29bea
fix(library/init/lean/parser/term): placeholder binder after bracketed binder
2018-11-19 13:38:45 +01:00
Sebastian Ullrich
cd287629cb
feat(library/init/lean/elaborator): initial version of translating syntax trees to preterms
2018-11-19 13:38:45 +01:00
Sebastian Ullrich
9e8dfbad79
perf(library/init/lean/parser): reintroduce separate syntax.ident constructor with much simpler and more efficient encoding
2018-11-18 16:55:04 +01:00
Sebastian Ullrich
68dad5e77c
chore(library/init/lean/parser/token): raw: unnecessary try
2018-11-18 16:11:41 +01:00
Sebastian Ullrich
6d0b3afa7e
fix(library/compiler/compiler): do not silently abort on user-given sorrys
2018-11-17 18:00:55 +01:00
Leonardo de Moura
3d24c6466b
feat(library/compiler/llnf): generate _boxed version eagerly
2018-11-15 18:10:20 -08:00
Leonardo de Moura
ae037c2a23
fix(library/compiler/builtin): incorrect assertion
2018-11-15 18:09:02 -08:00
Leonardo de Moura
da92557076
chore(library/vm/vm_int): missing builtin in the old VM
2018-11-15 16:58:05 -08:00
Leonardo de Moura
b55b1deaf5
chore(library/compiler): remove ir.cpp
...
There is only one missing transformation: insert explicit reference counting instructions.
We will implement this transformation at `llnf.cpp`. After that, we are
ready to emit C++ code.
2018-11-15 16:53:44 -08:00
Leonardo de Moura
e5666b3464
feat(library/compiler): remove another reference to vm.h
2018-11-15 16:38:01 -08:00
Leonardo de Moura
db5d976278
feat(library/compiler): use new builtin module
2018-11-15 16:30:42 -08: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
Leonardo de Moura
3a7d407d6c
feat(library/compiler/builtin): register io primitives
...
TODO: implement `io` primitives in the new runtime
2018-11-15 16:14:50 -08:00
Leonardo de Moura
4f2997d691
feat(library/compiler/builtin): use std::unordered_map
2018-11-15 13:48:11 -08:00
Leonardo de Moura
4b65e0bace
refactor(library/compiler/builtin): do not store pointer to functions
...
The interface between the (to be implemented) new interpreter and the
compiled code will be automatically generated.
2018-11-15 13:39:04 -08:00
Leonardo de Moura
5acdd68ad5
feat(library/compiler/init_module): initialize builtin module
2018-11-15 13:33:02 -08:00
Leonardo de Moura
b501613f8c
feat(library/compiler/builtin): register string primitive functions
2018-11-15 13:26:41 -08:00
Leonardo de Moura
70c4e33cf2
feat(runtime/object): missing string.iterator builtin functions
2018-11-15 13:05:29 -08:00