Leonardo de Moura
d3756fd915
feat(library/compiler): add _void type for LLNF format
2019-01-28 13:06:25 -08:00
Leonardo de Moura
274aeed30f
fix(library/compiler/compiler): make sure that the type of functions that return closures match their arity
...
Before this commit, we could have a LLNF function `f` of arity 0 and
type `_obj -> _obj`. Now, this kind of function has type `_obj`.
2019-01-25 15:40:25 -08:00
Leonardo de Moura
dd30cac8aa
feat(library/compiler/emit_cpp): emit module initialization function
2019-01-25 15:24:55 -08:00
Leonardo de Moura
5d5c498d92
fix(shell/lean): module_name is not a path
2019-01-25 15:02:11 -08:00
Leonardo de Moura
5bed81078a
feat(library/compiler/emit_cpp): generate function skeletons
2019-01-25 14:26:32 -08:00
Leonardo de Moura
b36b4f0d80
feat(library/compiler/emit_cpp): emit function headers
2019-01-25 14:26:32 -08:00
Leonardo de Moura
2016e1bce5
feat(library/compiler/llnf): unique names for lambda arguments
2019-01-25 14:26:32 -08:00
Leonardo de Moura
4b66b442c9
chore(library/compiler/emit_cpp): just store a list of decls
2019-01-25 14:26:32 -08:00
Sebastian Ullrich
2d9a16fd24
refactor(library/module_mgr): remove
2019-01-25 20:12:11 +01:00
Sebastian Ullrich
4c0f836305
chore(shell/lean): reduce lean interface to taking a single file, assuming all dependencies have already been built
2019-01-25 18:27:38 +01:00
Leonardo de Moura
bb9e7aceb3
feat(library/compiler/emit_cpp): add environment extension for emit_cpp
2019-01-24 16:04:31 -08:00
Leonardo de Moura
70bb89b213
feat(library/compiler): add [cppname] attribute
2019-01-24 14:40:12 -08:00
Leonardo de Moura
eace1bacb3
refactor(library/compiler): move name mangling procedures to separate file
...
We will need them to implement the LLVM IR backend.
2019-01-24 13:57:13 -08:00
Leonardo de Moura
214471a2c9
feat(library/abstract_parser): add parse_name virtual method
2019-01-24 13:54:05 -08:00
Leonardo de Moura
8ac423768c
chore(library/attribute_manager): remove dead code
2019-01-24 13:36:05 -08:00
Leonardo de Moura
f5f6a7f85e
feat(library/compiler/emit_cpp): take module name and (direct) dependencies as arguments
2019-01-23 16:34:04 -08:00
Leonardo de Moura
02849a3cf6
feat(library/compiler/emit_cpp): add name mangling functions
2019-01-23 14:46:04 -08:00
Leonardo de Moura
8bcc965dc0
feat(library/compiler): make sure we emit bytecode and C++
2019-01-23 14:13:04 -08:00
Leonardo de Moura
320917cca5
feat(library/compiler): add emit_cpp skeleton
2019-01-23 14:01:43 -08:00
Leonardo de Moura
d9df3d2b8f
feat(shell/lean): add --cpp=<file> command line option
2019-01-23 13:46:32 -08:00
Sebastian Ullrich
a823157338
fix(library/init/lean/expander): fix let expansion again
...
Last bug in core.lean!
2019-01-22 11:16:00 +01:00
Sebastian Ullrich
0846cc2aa0
fix(library/init/lean/elaborator): to_level
2019-01-22 11:16:00 +01:00
Sebastian Ullrich
01996bc4c6
chore(bin/lean-gdb): fix list_ref printer
2019-01-22 11:16:00 +01:00
Sebastian Ullrich
9f90dbfd3d
feat(library/init/lean/parser/syntax): improve syntax.get_pos for more error positions
2019-01-22 11:16:00 +01:00
Sebastian Ullrich
099354eb5f
fix(library/init/lean/expander): expansion of parameterized let
2019-01-21 22:07:10 +01:00
Sebastian Ullrich
814ceb43fe
fix(library/init/lean/parser/declaration): axiom, constant, what's the difference
2019-01-21 18:09:26 +01:00
Sebastian Ullrich
abf60e3242
feat(library/init/lean/elaborator): include
2019-01-21 18:09:18 +01:00
Sebastian Ullrich
74d80444ff
fix(frontends/lean/vm_elaborator): elab_attribute_cmd
2019-01-21 17:53:05 +01:00
Sebastian Ullrich
53d9cb5358
fix(library/init/lean/elaborator): resolve idents after 'attribute'
2019-01-21 17:47:17 +01:00
Sebastian Ullrich
280dc4e8d8
fix(library/class): is_anonymous_inst_name: ignore macro scopes
2019-01-20 21:43:35 +01:00
Sebastian Ullrich
7001eee350
fix(frontends/lean/vm_elaborator): never resolve to section variables in patterns
2019-01-20 18:48:51 +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
88534abccd
fix(library/init/lean/expander): tuple element order
2019-01-20 16:41:46 +01:00
Sebastian Ullrich
b24796d98e
feat(library/init/lean/elaborator): inaccessible
2019-01-20 16:41:33 +01:00
Sebastian Ullrich
69e363446d
fix(library/init/lean/{parser/term,elaborator}): local notations override previous notations
2019-01-20 16:25:15 +01:00
Sebastian Ullrich
05bf392385
fix(library/init/lean/frontend): parser error positions
2019-01-20 16:24:12 +01:00
Sebastian Ullrich
fc7acc9898
fix(library/init/lean/elaborator): choice
2019-01-20 14:39:22 +01:00
Sebastian Ullrich
dcd3b3dc5d
fix(library/init/lean/elaborator): section variables need to be preresolved as well
...
In
```
section binary
variables {α : Type u} {β : Type v}
variable f : α → α → α
local infix * := f
def commutative := ∀ a b, a * b = b * a
end binary
```
the expansion of `*` applies a macro scope to `f`, so we need to resolve it
before that
2019-01-20 13:22:08 +01:00
Sebastian Ullrich
1708fc74f8
fix(library/init/lean/elaborator): structure instances
2019-01-19 15:35:11 +01:00
Sebastian Ullrich
543c3d21ff
fix(frontends/lean/vm_elaborator): match and equations, oof
2019-01-19 15:20:52 +01:00
Leonardo de Moura
afd30d73c1
chore(library/compiler/compiler): generate Lean IR with explicit boxing and RC instructions
...
This is just for testing. These two steps are not used by `emit_bytecode`,
but they will be used to generate C++ code.
We can now compile the whole corelib in debug mode with these two extra
transformation without any assertion violation.
2019-01-18 16:01:47 -08:00
Leonardo de Moura
fe68547086
fix(library/compiler/llnf): missing instruction _uproj at explicit_rc_fn
2019-01-18 16:00:08 -08:00
Leonardo de Moura
1293d976f7
fix(library/compiler/util): usize case was missing at to_uint_type
2019-01-18 15:50:14 -08:00
Leonardo de Moura
a001806996
feat(library/compiler/compiler): generate boxed version of builtin constants
2019-01-18 15:43:06 -08:00
Leonardo de Moura
aaf1966a87
fix(library/compiler/llnf): explicit boxing should treat variables with function type (e.g., _obj -> _obj) as _obj
2019-01-18 15:07:01 -08:00
Leonardo de Moura
9ea7b77fe0
fix(library/compiler/llnf): typo
2019-01-17 17:10:52 -08:00
Leonardo de Moura
1d0d17d4ae
fix(library/compiler/llnf): bug at explicit boxing transformation
2019-01-17 16:58:22 -08:00
Leonardo de Moura
c3dfb613d5
test(tests/lean/run/rc_tests): basic explicit_rc_fn tests
2019-01-17 15:25:27 -08:00
Leonardo de Moura
1b59fed1d9
fix(library/compiler/llnf): bug at x := _proj y
...
We must increment `x`'s RC before (if needed) we decrement `y`'s RC
2019-01-17 15:23:52 -08:00
Leonardo de Moura
10456f1607
fix(library/compiler/llnf): constructors are not global constants
2019-01-17 14:18:58 -08:00