Leonardo de Moura
66304d83a0
chore(library/init/lean/compiler): export as C functions
2019-08-17 06:58:36 -07:00
Sebastian Ullrich
3ed67138d5
chore(*): update equation syntax in files and old parser
...
for f in ../../**/*.lean; do echo $f; ./patch.lean.out $f > tmp && cat tmp > $f; done
2019-08-09 11:11:34 +02:00
Leonardo de Moura
ea6eee516b
chore(frontends/lean): use => instead of := in match-expressions
...
Motivation: use same separator used in lambda expressions as in
other programming languages.
2019-07-04 11:38:38 -07:00
Leonardo de Moura
a02443d23d
chore(frontends/lean): fun x, e ==> fun x => e
2019-07-02 13:22:11 -07:00
Leonardo de Moura
16d423dab6
feat(frontends/lean): switch to [extern] implemented in Lean
...
This commit also changes how we represent attribute parameters as
Syntax objects.
2019-06-26 10:57:33 -07:00
Leonardo de Moura
64ee4e01a8
refactor(library/init/lean/attributes): split getParam into getParam and afterSet
2019-06-26 10:09:57 -07:00
Leonardo de Moura
1ff6ee3155
feat(library/init/lean/attributes): allow getParam at ParametricAttribute registration to update environment
2019-06-25 09:15:55 -07:00
Leonardo de Moura
697f69020f
fix(library/init/lean/parser/parser): new registerBuiltinParserAttribute
...
It is still broken since we apply attributes before we compile code.
Recall that attributes such as `@[export]` and `@[extern]` must be applied before we
compile code.
On the other hand, any attribute `attrName`
```
@[attrName] def foo := ...
```
which creates auxiliary definitions that depend on `foo` must be applied
AFTER we generate code for `foo`. Otherwise, we will fail to compile the
auxiliary definition since we don't have code for `foo` yet.
I will fix the issue above by allowing attributes to specify when they
should be applied. I will start with only two options: before and after
code compilation. In the future, we may need more options (e.g., before
elaboration), but I don't see the need yet.
cc @kha
2019-06-19 09:52:56 -07:00
Leonardo de Moura
0dfca42f6d
chore(library/init/lean/compiler/initattr): remove unnecessary @[export]
2019-06-18 16:15:48 -07:00
Leonardo de Moura
6219a2277a
fix(library/init/lean/compiler/initattr): getInitFnNameFor
2019-06-18 16:03:52 -07:00
Leonardo de Moura
696088cf2e
feat(library/init/lean/compiler/initattr): @[init] attribute in Lean
2019-06-18 16:03:52 -07:00
Leonardo de Moura
a03c236380
feat(library/init/lean/compiler/initattr): new @[init] attribute validation
2019-06-18 15:40:16 -07:00
Leonardo de Moura
91821529c0
feat(library/init/lean/compiler/initattr): register new @[init] attributre using new attribute manager
...
This is just the basic skeleton for testing
2019-06-18 15:20:17 -07:00
Leonardo de Moura
5b3aec088e
feat(library/init/lean/compiler/ir/emitcpp): emit module initialization code
2019-05-21 16:06:10 -07:00
Leonardo de Moura
4ed803c564
feat(library/init/lean/compiler/ir/emitcpp): emit skeletons
2019-05-20 19:08:21 -07:00