Commit graph

67 commits

Author SHA1 Message Date
Leonardo de Moura
939f8d9f16 fix: fixes #1240 2022-06-23 05:53:06 -07:00
Leonardo de Moura
02c4e548df feat: replace constant with opaque 2022-06-14 17:02:59 -07:00
Leonardo de Moura
041827bed5 chore: unused variables 2022-06-07 17:54:10 -07:00
Sebastian Ullrich
fb2a2b3de2 fix: fixup previous commit 2022-06-07 16:37:45 -07:00
Sebastian Ullrich
ae7b895f7a refactor: unname some unused variables 2022-06-07 16:37:45 -07:00
Leonardo de Moura
7995cb071f chore: add assertions to make sure TagDeclarationExtension and MapDeclarationExtension are not being misused
see #1111
2022-04-15 13:49:35 -07:00
Wojciech Nawrocki
367b0fc80f doc: note persistent exts are sometimes needed 2022-04-13 13:23:04 -07:00
Leonardo de Moura
272dd5533f chore: style use · instead of . for lambda dot notation
We are considering removing `.` as an alternative for `·` in the
lambda dot notation (e.g., `(·+·)`).
Reasons:
- `.` is not a perfect replacement for `·` (e.g., `(·.insert ·)`)
- `.` is too overloaded: `(f.x)` and `(f .x)` and `(f . x)`. We want to keep the first two.
2022-03-11 07:49:03 -08:00
Leonardo de Moura
5baac1905f fix: use private names for theorems that are created on demand
closes #1006
2022-02-07 13:16:22 -08:00
Leonardo de Moura
12e2a79170 chore: fix codebase after removing auto pure 2022-02-03 18:08:14 -08:00
Leonardo de Moura
cf3b8d4eb4 chore: cleanup
Make the code style more uniform.
We still have a lot of leftovers from the old frontend.
2022-01-26 09:18:17 -08:00
Sebastian Ullrich
52de670497 chore: clarify safety of compile-time code execution 2022-01-20 18:55:57 +01:00
Leonardo de Moura
bac91b9b5b chore: remove arbitrary 2022-01-15 12:14:27 -08:00
Leonardo de Moura
b0d9c16c7a chore: rename PointedType => NonemptyType 2022-01-15 11:43:53 -08:00
Henrik Böving
c1b31a57eb feat: store ModuleData of imported modules in EnvironmentHeader 2022-01-15 10:40:52 -08:00
Leonardo de Moura
e3241e82bc feat: define PointedType as { α : Type u // Nonempty α } 2022-01-14 20:36:51 -08:00
Leonardo de Moura
f01a124f18 fix: builtin attribute initialization
The failure was triggered if a module declared (only) builtin
attributes that do not have any persistent extension associated with
them.

Fixes #726
2021-10-20 13:55:54 -07:00
Leonardo de Moura
6eff84a7bb refactor: add generic mkBaseNameFor 2021-09-17 16:30:09 -07:00
Leonardo de Moura
3d485bf375 feat: add moduleDocExt 2021-08-06 13:40:54 -07:00
Sebastian Ullrich
9ef2345aec perf: enforce hash map load factor 2021-08-05 06:28:24 -07:00
Sebastian Ullrich
fbdcaab009 feat: show number of mmap-ed modules in --stats 2021-08-04 16:40:57 +02:00
Sebastian Ullrich
a00674fcba feat: compute .olean base address from module name 2021-08-04 16:40:57 +02:00
Leonardo de Moura
c913886938 chore: add private annotations 2021-08-03 18:15:39 -07:00
Leonardo de Moura
526cbfbcd0 refactor: add ImportingFlag.lean 2021-08-03 14:29:36 -07:00
Leonardo de Moura
3f72555437 feat: use staged sets at namespacesExt
Mathlib has more than 120k namespaces
2021-07-31 14:27:24 -07:00
Leonardo de Moura
6cc30a3f90 feat: add NameSSet
Staged set of names
2021-07-31 14:24:00 -07:00
Leonardo de Moura
bd60e59f9a feat: add HashMap.insert'
The new function returns a flag indicating whether the new entry
replaced an existing or not.
We use it to implement `importModules`.
2021-07-31 13:42:01 -07:00
Leonardo de Moura
a77598f7cf feat: user-defined attributes
See new test for an example.

closes #513
2021-07-26 18:24:10 -07:00
Leonardo de Moura
cdd1dbbb36 feat: user-defined environment extensions
New test demonstrates how to use them.
The user-defined extensions cannot be used in the same file where they
were declared because the `initialize` commands are only executed when
we import the modules containing them.

TODO: user-defined attributes.
2021-07-26 16:18:48 -07:00
Wojciech Nawrocki
522cbc16d9 fix: typo 2021-07-05 19:42:01 +02:00
Sebastian Ullrich
619873c842 feat: make System.FilePath opaque 2021-05-28 14:19:59 +02:00
Sebastian Ullrich
4354534fda feat: make FilePath a concrete type
Resolves #363
2021-05-28 14:19:59 +02:00
Leonardo de Moura
a58ff18a5b refactor: pos at time_task::time_task was a dead field 2021-01-30 11:10:18 -08:00
Leonardo de Moura
bfc1a16c02 chore: adjust instance param order 2021-01-13 18:31:41 -08:00
Sebastian Ullrich
a6c319a25c chore: remove message_builder from time_task 2021-01-12 09:51:14 -08:00
Leonardo de Moura
c4259649ed refactor: add MapDeclarationExtension 2021-01-10 18:25:56 -08:00
Leonardo de Moura
fcd73e72c1 feat: add getModuleOf
cc @Kha @Vtec234
2021-01-07 15:20:29 -08:00
Leonardo de Moura
3b6d65c3c3 chore: use deriving Inhabited 2020-12-13 10:09:20 -08:00
Leonardo de Moura
0ab368581a refactor: ScopedEnvExtension
1) `ScopedEnvExtension` module now mananges the push/pop/activate
methods. Motivations:
  - Easier to add attributes
  - One `ScopedEnvExtension` may be shared between multiple
  attributes (e.g., parsers)

2) Add `AttributeKind`
2020-12-04 16:22:43 -08:00
Leonardo de Moura
0869f38de4 chore: update structure, class, inductive 2020-11-27 15:09:30 -08:00
Leonardo de Moura
d6f778bec4 refactor: arbitrary without explicit arguments
@Kha I was tired of writing `arbitrary _` :)
There 0 places in the stdlib where the type needs to be provided.
If in the future we need to specify the type we can use
`arbitrary (α := <type>)`
2020-11-25 09:07:38 -08:00
Leonardo de Moura
c305c2691f chore: use := 2020-11-19 07:22:31 -08:00
Leonardo de Moura
2d2d39c78e chore: use mut 2020-11-07 17:32:13 -08:00
Leonardo de Moura
81d6e065e7 chore: adjust files and tests 2020-11-07 17:32:12 -08:00
Leonardo de Moura
10c32fcf94 chore: HasToString => ToString 2020-10-27 16:11:48 -07:00
Sebastian Ullrich
8e16589f60 fix: reimplement import profiler 2020-10-27 18:53:22 +01:00
Leonardo de Moura
16f7bef88f chore: remove old frontend leftovers 2020-10-26 09:08:07 -07:00
Leonardo de Moura
bad6233389 chore: remove legacy support for modification objects 2020-10-26 08:10:51 -07:00
Leonardo de Moura
13c2a8ff51 chore: remove #lang lean4 header 2020-10-25 09:54:07 -07:00
Leonardo de Moura
43fbfec1fd chore: avoid Array.iterate and Array.iterateM 2020-10-22 16:30:04 -07:00