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
a02443d23d
chore(frontends/lean): fun x, e ==> fun x => e
2019-07-02 13:22:11 -07:00
Leonardo de Moura
91e1d30cf8
feat(frontends/lean/builtin_exprs): use ; in do-notation
2019-06-27 18:00:43 -07:00
Leonardo de Moura
ab487ea4ac
feat(frontends/lean): allow ; instead of in in let-decls
2019-06-27 17:12:03 -07:00
Leonardo de Moura
16d423dab6
feat(frontends/lean): switch to [extern] implemented in Lean
...
This commit also changes how we represent attribute parameters as
Syntax objects.
2019-06-26 10:57:33 -07:00
Leonardo de Moura
64ee4e01a8
refactor(library/init/lean/attributes): split getParam into getParam and afterSet
2019-06-26 10:09:57 -07:00
Leonardo de Moura
1ff6ee3155
feat(library/init/lean/attributes): allow getParam at ParametricAttribute registration to update environment
2019-06-25 09:15:55 -07:00
Leonardo de Moura
5d27fd279b
feat(library/init/lean/attributes): add EnumAttributes
2019-06-24 15:48:12 -07:00
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