Commit graph

21 commits

Author SHA1 Message Date
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
db6f08e66d feat(library/init/lean/compiler/ir): collect fnbody free variables 2019-03-07 15:37:45 -08:00
Leonardo de Moura
50476328ff feat(library/init/lean/name): add name_map 2019-03-06 12:32:08 -08:00
Leonardo de Moura
3f50df70bc perf(library/init/lean/name): use hash code to speedup name.quick_lt
We use the same trick in the C++ version of this function.

I measured the impact using `lean --new-frontend core.lean` and checking
the number of instructions executed reported by Valgrind.
Before:  4,891,642,264
After:   4,847,313,330
2019-03-04 12:48:06 -08:00
Leonardo de Moura
4627929a83 refactor(boot,runtime,util): move name runtime implementation to util/name, and use "extern C" ABI 2019-02-13 08:27:23 -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
2058d33d07 feat(runtime,library/compiler): add name.dec_eq builtin 2019-02-05 14:36:02 -08:00
Sebastian Ullrich
595590e7f5 feat(library/init/lean/elaborator): elaborate open and export 2019-01-01 13:50:21 +01:00
Leonardo de Moura
12d8b0e7ef feat(library/init/data): annotate rbtree and rbmap functions 2018-10-19 14:57:31 -07:00
Sebastian Ullrich
5a21d45836 refactor(library/init/lean/expander): introduce some coercions 2018-09-25 09:16:02 -07:00
Leonardo de Moura
71dd8653bc feat(library/init/core): decidable_eq is a proper class
We need this to take advantage of the new indexing structure we are
going to add to improve performance.
2018-09-07 16:38:11 -07:00
Leonardo de Moura
e9b4b811de chore(library/equations_compiler/util): disable generation of equational lemmas
@kha, `eqn_compiler.lemmas` is false by default.
I will keep them disabled until I remove the inductive compiler.
I'm building the new inductive datatype module (to replace the inductive
compiler), and the lemmas will fail to be proved in the next commits
until the transition is complete.
2018-06-12 13:03:25 -07:00
Leonardo de Moura
441b9077b2 feat(library/comp_val): add mk_name_val_ne_proof
We need this procedure otherwise it takes forever to prove equation lemmas
for definitions such as:

```
def macros : name → option macro
| `lambda := some lambda_macro
| `intro_x := some intro_x_macro
| _ := none
```

We never experienced this problem in Lean3 because we used `name`
literals only occurred in patterns of *meta* definitions. So, no
equation lemma was generated.

@kha `def macros` was taking more than 1 second to elaborate on my
machine. It is now instantaneous.
2018-06-06 09:18:59 -07:00
Sebastian Ullrich
732c823646 feat(library/init/lean/parser): remove syntax_id, use De Bruijn indices instead 2018-06-06 15:36:28 +02:00
Leonardo de Moura
89b4bb7210 feat(library/init/data/hashable): add hashable nat instance 2018-05-06 07:53:29 -07:00
Leonardo de Moura
3079d2d007 feat(library/init/lean/name): add hashable instance 2018-05-06 07:49:17 -07:00
Leonardo de Moura
d5fe509c36 chore(*): remove end after each match-expression
`end` is not optional anymore
2018-05-04 11:30:06 -07:00
Leonardo de Moura
92fa43e7d8 feat(library/init/lean/ir/ir): use name 2018-05-01 12:40:49 -07:00
Leonardo de Moura
09d3809a42 feat(library/init/lean/name): add has_to_string and has_to_format instances 2018-04-30 12:01:56 -07:00
Leonardo de Moura
c5abd6868d feat(library/init/lean/name): add quick_lt 2018-04-30 11:29:26 -07:00
Leonardo de Moura
b39daa40ef feat(library/init/lean/name): add lean.name 2018-04-29 08:44:58 -07:00