Commit graph

17 commits

Author SHA1 Message Date
Leonardo de Moura
e0ddacfd3e feat(library/init/lean/attributes,frontends/lean): allow attributes to specify when they should be applied 2019-06-20 09:17:03 -07:00
Leonardo de Moura
e86e6af049 feat(library/init/lean/attributes): add applicationTime field and remove unnecessary parameters 2019-06-20 08:48:26 -07:00
Leonardo de Moura
451ab72eea fix(library/init/lean/attributes): typo 2019-06-19 10:21:40 -07:00
Leonardo de Moura
dbe7078e80 feat(library/init/lean/attributes): add ParametricAttribute.setParam 2019-06-18 17:24:16 -07:00
Leonardo de Moura
89738ac344 feat(library/init/lean/attributes): add ParametricAttribute 2019-06-18 12:49:53 -07:00
Leonardo de Moura
e05cdc2b08 feat(library/init/lean/compiler): declare function inlining attributes in Lean
Remark: they are not active yet since we haven't removed the ones
defined in C++ yet.
2019-06-06 11:05:54 -07:00
Leonardo de Moura
c8a972c57b fix(library/init/lean/attributes): typos at @[export] 2019-06-06 10:41:17 -07:00
Leonardo de Moura
44cba2fb3d chore(library/init/lean/attributes): add Inhabited instance and improve stats 2019-06-06 10:39:40 -07:00
Leonardo de Moura
280e7bb006 feat(library/init/lean/attributes): add TagAttributes
`TagAttribute`s are implemented on top of the low level Attribute API,
and `PersistentEnvExtension`.
This is just the first attribute on a series of attributes we are
going to implement using Lean itself.
2019-06-05 21:54:28 -07:00
Leonardo de Moura
fb77d71d23 feat(library/init/lean/attributes): export attribute API 2019-06-05 16:55:47 -07:00
Leonardo de Moura
7909d86e5d feat(library/init/lean): Syntax objects with new SyntaxNodeKind and Substring, and arrays instead of lists
We can use `SyntaxNodeKind.id : Nat` to implement maps from kind to
values using arrays.
2019-06-05 15:35:51 -07:00
Leonardo de Moura
55626ba60d chore(library/init/lean): disable new frontend for now
We are going to start making drastic changes in the parser,
elaborator, attributes, etc. Examples:
- No View objects. I am going to implement match_syntax.
- No RecT in the parser. I am going to implement parser extensions
using an approach similar to the one I used to implement environment
extensions.
- No Parsec. I will use an approach similar to the one used in the
experiment https://github.com/leanprover/lean4/tree/master/tests/playground/parser

It is easier to perform these changes with the new frontend disabled.
I will slowly re-active it as I apply the changes.

cc @kha
2019-06-05 15:26:43 -07:00
Leonardo de Moura
642992eeca chore(library/init/lean/attributes): missing @[export] 2019-06-05 13:30:26 -07:00
Leonardo de Moura
fd9c8a4c82 feat(library/init/lean/attributes): add pushScope/popScope, missing APIs, and @[export] 2019-06-05 13:17:25 -07:00
Leonardo de Moura
67a4ebbde6 feat(library/init/lean/attributes): low level attribute registration, and frontend attribute actions
Remark: the attribute actions used by the frontend are all in IO.
These actions access attributes by name, and need access to the IO.ref
that contains all registered attributes in the system.
2019-06-05 09:15:35 -07:00
Leonardo de Moura
583f38d1e5 feat(library/init/lean/attributes): attribute API for implementing the new frontend 2019-06-05 07:02:06 -07:00
Leonardo de Moura
c480f1f95c refactor(library/init/lean/environment): move scope management to attributes.lean 2019-06-04 16:50:29 -07:00