Leonardo de Moura
c427fb4086
refactor(*): create library/init/lean folder
...
The new folder will contain the new parser, macro expander and compiler.
This commit also renames the namespace for the old parser `lean3.parser`
2018-04-27 08:02:40 -07:00
Leonardo de Moura
c195d7c2a1
feat(library/tactic/simp_tactic): improve mk_simp_attr
...
- An new simp attribute may depend on other existing attributes
- Add `[norm]` simp attribute. It is an extension of the default `[simp]` attribute.
It should be used to add extra rules for normalizing goals.
These extra rules are used to produce normal forms and/or reduce the
number of constants used in a goal. Here is an example coming from a
discussion with @kha. When working with monads, we may want to
eliminate `<$>` by using the lemma `f <$> x = x >>= pure ∘ f`.
This lemma is in the `[norm]` simp set, but it is not in `[simp]`
2018-01-16 16:47:30 -08:00
Sebastian Ullrich
7ff06b2184
chore(init/meta/attribute): rename user_attribute.set_param to user_attribute.set
...
Setting the parameter value really is a side effect of setting the whole attribute
2017-09-14 18:48:18 +02:00
Sebastian Ullrich
1544c3d390
feat(library/tactic/user_attribute,init/meta/attribute): user_attribute.set_param
2017-09-05 23:14:34 +02:00
Sebastian Ullrich
ea6a4159a9
feat(library/tactic/user_attribute,init/meta/attribute): implement parameterized user attributes
2017-09-05 23:14:34 +02:00
Sebastian Ullrich
3188c4cbcf
refactor(library/tactic/user_attribute,init/meta/attribute): merge caching_user_attribute into user_attribute
...
The inheritance-based approach doesn't scale to a second subclass for parameterized attributes
2017-09-05 23:14:34 +02:00
Sebastian Ullrich
4f66673fc2
feat(init/meta/attribute,library/tactic/attribute): user_attribute apply handlers
2017-08-02 14:32:39 +01:00
Leonardo de Moura
4575c9e038
feat(frontends/lean): swap (t) and ``(t) semantics
2017-05-15 09:41:31 -07:00
Sebastian Ullrich
4b21b13649
refactor(init): replace has_quote class with reflected
2017-05-09 16:02:42 -07:00
Sebastian Ullrich
e3b9190fe2
refactor(library/tactic/user_attribute): use attribute for registering attributes. naturally.
2017-03-15 14:06:34 -07:00
Sebastian Ullrich
ddfdca2e57
chore(init/meta): replace some uses of to_expr `(...) with ``(...)
2017-03-05 08:37:16 -08:00
Leonardo de Moura
921d72b6c4
feat(library/init/meta): add helper tactics
2017-02-24 16:26:47 -08:00
Leonardo de Moura
0a99910c52
feat(library/init/meta): add exception set to rsimp attributes, use iff lemmas
2017-02-18 19:43:21 -08:00
Leonardo de Moura
0626835530
feat(library/init/meta): add native name_set
2017-02-18 19:07:50 -08:00
Leonardo de Moura
c816b80855
chore(*): don't use upper case letter for type variables, and camelCase for declarations
2016-11-17 14:54:08 -08:00
Leonardo de Moura
4516d1b046
feat(library/init/meta/attribute, library/tactic/user_attribute): make sure caching_user_attribute is in (Type 1)
2016-10-04 02:05:34 -07:00
Leonardo de Moura
7c07d269f9
refactor(library/tactic/user_attribute): cache builder must be a tactic
2016-10-03 14:20:37 -07:00
Leonardo de Moura
572751c56e
feat(frontends/lean): force user to use meta keyword on meta inductive/structure/class
...
Before this commit, we were inferring whether an
inductive/structure/class were meta or not. This was bad since the user
had no clue whether the type was trusted (non meta) or not.
Moreover, users could get confused by this behavior and assume the
kernel was allowing trusted code to rely on untrusted one.
2016-09-29 17:56:35 -07:00
Leonardo de Moura
148da46481
feat(frontends/lean): 'mutual' and 'meta' are now keywords
2016-09-24 10:44:40 -07:00
Sebastian Ullrich
5e3e54e208
feat(library/tactic/user_attribute): Support pure function caching for user-defined attributes
2016-09-12 10:38:48 -07:00
Leonardo de Moura
e4fd627ae2
feat(library/attribute_manager): fingerprints
...
The fingerprint changes whenever a new attribute is added.
2016-08-23 08:20:37 -07:00
Sebastian Ullrich
21e8c23ed7
feat(library/vm/user_attribute): use command instead of attribute for registering
2016-08-18 15:51:41 -07:00
Sebastian Ullrich
ca8be3857c
feat(library/user_attribute): add user-defined attributes and make attribute_manager environment-aware
2016-08-18 12:56:44 -07:00