Commit graph

32 commits

Author SHA1 Message Date
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
b939162168 chore(library): switch from snake_case to camelCase 2019-03-21 15:06:43 -07:00
Leonardo de Moura
d5180ffa17 fix(library/init/lean/elaborator): make sure new frontend can parse the latest core.lean 2019-03-18 15:47:05 -07:00
Leonardo de Moura
0b7d987699 feat(frontends/lean, library/init/lean): opaque constants
@kha I have added support for opaque constants to the old C++ frontend,
and made sure the new frontend can still parse `library/init/core.lean`.
The kernel should enforce that opaque constants are really opaque, and
the following example should fail
```
constant x : nat := 0
theorem foo : x = 0 := rfl
```
If it doesn't, it is a bug.

Here are some remaining issues:
1- `environment.mk_empty` is currently an axiom because we cannot create
an inhabitant of an opaque type. A possible solution is to use
`option environment` instead of `environment`.

2- There is no support for opaque constants in the new
frontend. However, I modified it to handle axioms, and fixed the literal
values with decl_cmd_kind. I tried to mark some of my changes with
comments, but it is probably much easier for you to just check the
commit change list.

3- I did not add any support for automatically constructing `e`
at `constant x : t := e`. I think we can do this later
after we replace the old frontend with the new one. BTW, it took only a
few minutes to provide the inhabitants manually.
2019-03-15 17:41:44 -07:00
Leonardo de Moura
ecdb9d6df0 feat(library/init, frontends/lean): add abbreviation for abbreviation 2019-03-15 16:01:25 -07:00
Leonardo de Moura
a78c773f37 feat(library/init/lean): unsafe support in the new frontend 2019-03-15 15:49:03 -07: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
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
fc3a0403ab feat(library/init/lean/parser/declaration): implement structure field blocks that go beyond regular binder syntax 2019-01-15 15:00:34 +01:00
Sebastian Ullrich
5b44a6f93d feat(library/init/lean/parser/parsec): structured doc_comment syntax nodes 2018-12-19 14:42:33 +01:00
Sebastian Ullrich
0cf88598d2 feat(library/init/lean/parser/declaration): stricter grammar for universe parameters and non-optional declaration types 2018-12-19 14:41:17 +01:00
Sebastian Ullrich
4b3995fac3 refactor(library/init/lean/parser/term): factor out opt_type parser 2018-12-06 13:23:12 +01:00
Sebastian Ullrich
143ac0e58a feat(library/init/lean/expander): also normalize bracketed binders in e.g. declarations 2018-12-06 13:23:12 +01:00
Sebastian Ullrich
188ab30a9c fix(library/init/lean/parser/declaration): precedence for attribute arguments 2018-10-30 17:43:05 +01:00
Sebastian Ullrich
758d258210 fix(library/init/lean/parser/term): rename term.ident to ident_univs to remove confusion with ident
`protected` didn't do anything here
2018-10-13 08:11:36 -07:00
Sebastian Ullrich
4e3f9b46c2 refactor(library/init/lean/parser/token): remove weird with_source higher-order function 2018-10-05 08:52:04 -07:00
Sebastian Ullrich
959948b901 feat(library/init/lean): even more core.lean progress 2018-10-03 16:00:08 -07:00
Sebastian Ullrich
533ac2d5b2 fix(library/init/lean/parser/declaration): attributes before visibility modifiers 2018-10-02 14:55:28 -07:00
Sebastian Ullrich
fc5120290f feat(library/init/lean/parser/term): inductive levels, let, structure instances 2018-10-02 14:55:28 -07:00
Sebastian Ullrich
945bf39e05 feat(library/init/lean): progress 2018-09-28 20:50:18 -07:00
Sebastian Ullrich
e661aaeacf refactor(library/init/lean/parser): store registered parsers in configs, use config hierarchy to avoid mutually recursive types
And other refactorings along the way
2018-09-27 10:05:10 -07:00
Sebastian Ullrich
b859560a83 feat(library/init/lean/parser/term): @/@@ notation 2018-09-20 09:40:21 -07:00
Sebastian Ullrich
0a8d0a6870 feat(library/init/lean/parser/term): projection notation 2018-09-20 09:40:21 -07:00
Sebastian Ullrich
d7d968cead feat(library/init/lean/parser/basic): merge explicit and default (0) token precedences 2018-09-20 09:40:21 -07:00
Sebastian Ullrich
c7c459d47b Revert "perf(library/init/lean/parser): collect tokens in trie instead of list, do not inline"
This reverts commit e4c50b2b09.

Lists are efficient enough and make it easier to customize the trie construction.

Keep the `donotinline` though.
2018-09-20 09:38:10 -07:00
Sebastian Ullrich
b7f7f257c5 feat(library/init/lean/parser/declaration): inductive, structure 2018-09-20 09:38:10 -07:00
Sebastian Ullrich
e4c50b2b09 perf(library/init/lean/parser): collect tokens in trie instead of list, do not inline 2018-09-19 12:36:34 -07:00
Sebastian Ullrich
e3afe02786 feat(library/init/lean/parser/declaration): doc comments and axioms 2018-09-19 12:36:34 -07:00
Sebastian Ullrich
fa0148e5b8 feat(library/init/lean/parser): declarations and binders 2018-09-17 18:47:50 -07:00