Commit graph

28 commits

Author SHA1 Message Date
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
7049f4a889 feat(library/init/lean/class): register attributes and export functions 2019-06-27 13:27:13 -07:00
Leonardo de Moura
1a40a38bf1 feat(library/init/lean/class): add helper functions 2019-06-26 19:43:12 -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
bc809643ec feat(library/init/lean/expr): add Expr.quickLt, Expr.eqv 2019-05-15 11:01:25 -07:00
Leonardo de Moura
1c671965c5 feat(library/init/lean/options): add registerOption 2019-03-22 17:26:43 -07:00
Leonardo de Moura
dc73d5443d refactor(library/init/lean): add MData abbreviation 2019-03-22 17:26:43 -07:00
Leonardo de Moura
1fe3f14ad0 chore(*): Uint => UInt, Usize => USize 2019-03-21 15:06:44 -07:00
Leonardo de Moura
04e20623e6 chore(*): use lowercase dir names 2019-03-21 15:06:44 -07:00
Leonardo de Moura
67fb78bb47 chore(*): renaming files 2019-03-21 15:06:44 -07:00
Sebastian Ullrich
beda5f5f43 chore(library): capitalize types and namespaces 2019-03-21 15:06:43 -07:00
Sebastian Ullrich
f7aeeaf237 exclude export/extern, translate constants.txt 2019-03-21 15:06:43 -07:00
Sebastian Ullrich
b939162168 chore(library): switch from snake_case to camelCase 2019-03-21 15:06:43 -07:00
Leonardo de Moura
ffc3436dd6 feat(library/init/lean): remove some TODOs using the new opaque constants 2019-03-15 17:49:10 -07:00
Leonardo de Moura
e0fd89e165 feat(library/init/lean/compiler): fold nat predicates 2019-02-15 16:17:16 -08:00
Leonardo de Moura
5e7308d22d chore(library/init/lean/expr): get_app_fn 2019-02-14 14:12:25 -08:00
Leonardo de Moura
9cb2005e8e feat(library/init/lean): add hash functions and dbg_to_string 2019-02-13 16:19:25 -08:00
Leonardo de Moura
b89eb64cf1 refactor(library/init/lean/expr): use native constructors 2019-02-13 15:07:49 -08:00
Sebastian Ullrich
f9b3244d97 fix(library/init/lean/expr): literal: use C++ constructor ordering 2019-02-07 13:03:09 +01:00
Sebastian Ullrich
4e96f092f9 feat(library/init/lean/elaborator): delegate elaboration of attribute 2018-12-14 17:38:19 +01:00
Leonardo de Moura
c3569dc72d feat(kernel): store structure name in proj-expressions 2018-10-02 09:23:11 -07:00
Leonardo de Moura
3e5f59d6df chore(kernel): remove expr.quote constructor
In Lean4, we will reify expressions.
2018-09-07 22:08:08 -07:00
Leonardo de Moura
fdbb1964e0 chore(library/init/lean/expr): document mvar new design 2018-06-22 15:06:36 -07:00
Leonardo de Moura
1063905d07 chore(kernel/expr): reorder constructors and fix typo 2018-06-22 12:39:16 -07:00
Leonardo de Moura
318530cf07 refactor(library/init/meta/expr): use lean.expr
`expr` is finally non-meta
2018-06-22 10:29:56 -07:00
Leonardo de Moura
a49de9ccd3 feat(library/init/lean): add kvmap
We use it to implement `expr.mdata` and `options`
2018-06-15 16:05:11 -07:00
Leonardo de Moura
73e067d361 feat(kernel): add expression literals 2018-06-14 14:55:14 -07:00
Leonardo de Moura
021bc40e95 feat(library/init/lean/expr): new lean.expr type 2018-06-13 15:44:15 -07:00