Commit graph

8 commits

Author SHA1 Message Date
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