lean4-htt/library/init/lean/parser
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
..
basic.lean feat(library/init, frontends/lean): add abbreviation for abbreviation 2019-03-15 16:01:25 -07:00
combinators.lean refactor(library/init/lean/parser/term): factor out opt_type parser 2018-12-06 13:23:12 +01:00
command.lean feat(library/init, frontends/lean): add abbreviation for abbreviation 2019-03-15 16:01:25 -07:00
declaration.lean feat(frontends/lean, library/init/lean): opaque constants 2019-03-15 17:41:44 -07:00
identifier.lean refactor(library/init/lean/parser/parsec): make sure custom error message doesn't need to be inhabited 2018-10-21 10:57:23 -07:00
level.lean feat(library/init, frontends/lean): add abbreviation for abbreviation 2019-03-15 16:01:25 -07:00
module.lean feat(library/init, frontends/lean): add abbreviation for abbreviation 2019-03-15 16:01:25 -07:00
notation.lean feat(library/init/lean/elaborator): do name preresolution just before elaboration 2019-01-06 15:47:54 +01:00
parsec.lean feat(library/init, frontends/lean): add abbreviation for abbreviation 2019-03-15 16:01:25 -07:00
pratt.lean perf(library/init/lean/parser): reintroduce separate syntax.ident constructor with much simpler and more efficient encoding 2018-11-18 16:55:04 +01:00
rec.lean refactor(library/init/lean/parser/rec): use init.fix 2019-03-12 08:31:58 -07:00
string_literal.lean feat(library/init/data/char): use uint32 instead of nat for defining char 2019-02-15 18:07:55 -08:00
syntax.lean feat(library/init, frontends/lean): add abbreviation for abbreviation 2019-03-15 16:01:25 -07:00
term.lean fix(library/init/lean/parser/term,frontends/lean/builtin_exprs): @& should have higher rbp than -> 2019-03-07 14:35:25 +01:00
token.lean feat(library/init/lean,frontends/lean/vm_elaborator): set_option 2019-01-20 18:21:41 +01:00
trie.lean refactor(library/init/data): avoid indirection at rbmap 2018-10-26 17:14:09 -07:00