Commit graph

2550 commits

Author SHA1 Message Date
Leonardo de Moura
6be47dfb97 feat(library/init/data/string/basic): use extern attribute 2019-02-11 17:54:24 -08:00
Leonardo de Moura
73d590f1fb feat(library/init/io): use extern attribute 2019-02-11 16:56:54 -08:00
Leonardo de Moura
5a5e949578 feat(library/init/lean/name): use extern attribute 2019-02-11 16:12:25 -08:00
Leonardo de Moura
7b0227572f fix(library/init/core): missing borrowed annotation 2019-02-11 16:01:56 -08:00
Leonardo de Moura
9c3675f58f feat(library/init/data): use extern when declaring uint and usize primitives 2019-02-11 15:15:57 -08:00
Leonardo de Moura
bc4e06666b chore(*): avoid 0-ary extern declarations 2019-02-11 13:21:17 -08:00
Leonardo de Moura
1703255330 fix(library/init/core): we simulate the unused attribute feature using extern inline 2019-02-11 11:38:24 -08:00
Leonardo de Moura
befa53ec70 feat(library/compiler/emit_cpp): use new extern_attribute module 2019-02-11 11:03:56 -08:00
Leonardo de Moura
348ccf533c feat(library/compiler): borrowed annotations 2019-02-11 10:08:47 -08:00
Leonardo de Moura
7e8f9e6f66 feat(library/compiler): add [extern] attribute 2019-02-09 18:53:44 -08:00
Leonardo de Moura
e8758a1707 chore(library/compiler/export_attribute): exporting constructors is messy
It is much simpler and only slightly more verbose to export an
auxiliary function that just invokes the constructor.
2019-02-09 18:00:27 -08:00
Sebastian Ullrich
b809bb5311 feat(library/init/lean/frontend): demangle and remove read_file 2019-02-09 19:55:53 +01:00
Leonardo de Moura
b50f9de3b8 feat(library/init/lean/extern): declare extern_attr_data and helper functions 2019-02-08 16:55:44 -08:00
Leonardo de Moura
efe64cb2d3 feat(library/init/data/list/basic): tail recursive length 2019-02-08 16:51:44 -08:00
Leonardo de Moura
4734e55f6d feat(library/init/data): tail recursive append 2019-02-08 16:35:20 -08:00
Leonardo de Moura
afc2569f7c fix(library/init/data/nat/basic): tail recursive nat.repeat 2019-02-08 11:00:48 -08:00
Leonardo de Moura
bfbfe94ac9 chore(library/init/control/default): add init.control.combinators 2019-02-07 09:12:53 -08:00
Sebastian Ullrich
f9b3244d97 fix(library/init/lean/expr): literal: use C++ constructor ordering 2019-02-07 13:03:09 +01:00
Leonardo de Moura
2058d33d07 feat(runtime,library/compiler): add name.dec_eq builtin 2019-02-05 14:36:02 -08:00
Leonardo de Moura
ff54bf337a fix(library/init/data/repr): ultra inefficient to_digits
It was very inefficient, and was producing stack overflows for big numbers.
2019-02-05 13:36:13 -08:00
Leonardo de Moura
0918a599ae feat(*): builtin support for uint functions
@kha The VM versions just throw exceptions. They are just stubs to
make sure we can compile Lean.
I implemented the uint functions in the new runtime, but there are a
few missing cases marked with TODO.
I needed these builtins to be able to compile the C++ generated code for
corelib.
2019-02-01 17:04:24 -08:00
Leonardo de Moura
54f501594d chore(library/init/data/uint,library/init/data/usize): simplify 2019-02-01 15:41:55 -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
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
53d9cb5358 fix(library/init/lean/elaborator): resolve idents after 'attribute' 2019-01-21 17:47:17 +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
a23df570fc fix(library/init/lean/elaborator): match 2019-01-17 19:57:00 +01:00
Sebastian Ullrich
3e8e823893 fix(frontends/lean/vm_elaborator): preserve internal name of section variables 2019-01-17 19:57:00 +01:00
Sebastian Ullrich
85cad3a7f1 fix(library/init/lean/elaborator): equation heads 2019-01-17 19:57:00 +01:00
Sebastian Ullrich
8cc35b854b feat(library/init/lean/{expander,elaborator}): variable(s) 2019-01-17 17:06:52 +01:00
Sebastian Ullrich
0923a2cbae refactor(library/init/lean/elaborator): avoid deprecated expr locals in new elaborator state 2019-01-17 12:29:44 +01:00
Sebastian Ullrich
c338245536 feat(library/init/lean/elaborator): implement the only part of open/export 2019-01-16 19:49:44 +01:00
Sebastian Ullrich
13781ed114 feat(library/init/lean/parser/token): numeric literals of more exotic bases 2019-01-16 19:39:30 +01:00
Sebastian Ullrich
2c4b566038 feat(frontends/lean/vm_elaborator): implement equations 2019-01-16 19:12:40 +01:00
Sebastian Ullrich
a6d5af7387 feat(library/init/lean/expander): expand class and class inductive 2019-01-16 19:12:40 +01:00
Sebastian Ullrich
246eecf155 fix(library/init/lean/elaborator): do not mangle attribute names (since they are not environment identifiers) 2019-01-16 19:12:40 +01:00
Sebastian Ullrich
ca058a6d8e chore(library/init/lean/expander): simplify constant normalization 2019-01-16 19:12:40 +01:00
Sebastian Ullrich
5ef30a9300 fix(library/init/lean/elaborator): have serialization 2019-01-16 19:12:40 +01:00
Sebastian Ullrich
dce62fc190 fix(library/init/lean/expander): structural substitution instead of abstraction-application when applying notations 2019-01-16 19:12:40 +01:00