Commit graph

13 commits

Author SHA1 Message Date
Leonardo de Moura
b1d5a4284d feat(library/init/lean): address issue raised in the previous commit
We also changed the type of `addImportedFn` to `Array (Array α) → IO σ`.
This modification avoids the `unsafeIO` hack at `parser.lean`.
2019-07-18 13:20:46 -07:00
Leonardo de Moura
18ab2be51c feat(library/init/lean/environment): use Thunk to store environment extension initial state 2019-07-13 13:58:20 -07:00
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
ab487ea4ac feat(frontends/lean): allow ; instead of in in let-decls 2019-06-27 17:12:03 -07:00
Leonardo de Moura
89ab07a4b0 refactor(library/init/lean/environment): more flexible PersistentEnvExtensionState
The previous API was not flexible enough to implement the new
`AttributeManager` with all "bells and whistles" we want.
For example, the new `addImportedFn` field allows us to initialize
the state for the imported entries using a `Thunk`.
2019-06-04 16:35:21 -07:00
Leonardo de Moura
0a08569b46 feat(library/init/lean/environment): remove lazy, add addImported field to PersistentEnvExtension
It seems `lazy := false` is only going to be used in the attribute
manager. So, I remove it. I added a new field `addImported : Bool`
instead. An extension can specify whether `addEntryFn` is going to be
invoked or not for imported entries. `addImported := false` is useful for extensions such
as `protected`, and I will use it in the attribute manager too.
2019-06-03 16:45:27 -07:00
Leonardo de Moura
ed1a433d52 feat(library/init/lean/modifiers): add privatePrefix 2019-06-03 10:33:40 -07:00
Leonardo de Moura
224195a1fb feat(library/init/lean/modifiers): environment extension for private declarations 2019-06-03 10:10:00 -07:00
Leonardo de Moura
8ab15536a7 perf(library/init/data/array/binsearch): add binSearchContains 2019-05-14 20:52:57 -07:00
Leonardo de Moura
45eda6d81b perf(library/init/lean/modifiers): add only local entries to state
We can use `getModuleEntries` and `getModuleIdxFor` to test whether a
constant is protected or not.
2019-05-14 20:30:46 -07:00
Leonardo de Moura
5fa924ff4a feat(library/init/lean/environment): improve registerPersistentEnvExtension signature 2019-05-14 16:25:43 -07:00
Leonardo de Moura
da5b900cbd feat(library/init/lean): add protected extension 2019-05-14 16:04:24 -07:00