Leonardo de Moura
f75d59047f
feat: add commitWhenSomeNoEx?
...
TODO: better name?
This commit also removes the `[specialize]` annotations.
2022-10-28 07:51:41 -07:00
Leonardo de Moura
ad98df80fe
feat: congr theorems using Iff
...
closes #1763
2022-10-26 18:00:24 -07:00
Leonardo de Moura
2cd21e08ba
chore: add CollectLevelParams.visitLevels
2022-10-24 19:50:09 -07:00
Leonardo de Moura
81f8ab8fbb
refactor: Level.instantiateParams => Level.substParams, add Level.instantiateParams
...
Motivation: make sure `Level.instantiateParams` and
`Expr.instantiateLevelParams` have similar types.
2022-10-24 19:49:57 -07:00
Gabriel Ebner
fa9538ffa6
perf: use old instantiateLevelParams in compiler
2022-10-24 12:23:13 -07:00
Gabriel Ebner
d87c36157a
perf: speed up Expr.replace
2022-10-24 12:23:13 -07:00
Gabriel Ebner
dcc97c9bbe
fix: preserve sharing in instantiateLevelParams
2022-10-24 12:23:13 -07:00
Mario Carneiro
583e023314
chore: snake-case attributes (part 2)
2022-10-19 09:28:08 -07:00
Leonardo de Moura
870de844dc
chore: annotate relevant monadic code with [alwaysInline]
...
TODO: after we delete old code generator, we should replace
`@[alwaysInline, inline]` with `@[alwaysInline]`.
Remainder: we want the old code generator to ignore `@[alwaysInline]`
annotations, in particular, the new ones on `instance` commands that
are actually annotations for the instance methods.
2022-10-12 19:48:02 -07:00
Mario Carneiro
85119ba9d1
chore: move Std.* data structures to Lean.*
2022-09-26 05:46:04 -07:00
Leonardo de Moura
27c504107e
feat: universe level parameter helper functions for the compiler
2022-09-17 16:29:44 -07:00
Mario Carneiro
6392c5b456
chore: import reductions
2022-09-15 14:02:38 -07:00
Gabriel Ebner
f1b5fa53f0
chore: use new comment syntax
2022-09-14 08:26:17 -07:00
Leonardo de Moura
b777d411ec
feat: add useRaw parameter at constructorApp?
...
and document this API.
2022-09-12 15:56:36 -07:00
Mario Carneiro
ebb5b97d73
chore: move Bootstrap.Data -> Lean.Data
2022-08-31 11:48:57 -07:00
Mario Carneiro
b2b02295b0
chore: move ShareCommon to Init / Lean
2022-08-30 07:51:43 -07:00
Mario Carneiro
bf89c5a0f5
chore: move Std -> Bootstrap
2022-08-29 01:26:12 -07:00
Gabriel Ebner
2e6395d525
doc: trace messages
2022-08-15 08:55:25 -07:00
Gabriel Ebner
5e4b30c777
chore: remove traceCtx
2022-08-15 08:55:25 -07:00
Gabriel Ebner
64031e5231
chore: remove obsolete addTraceOptions
2022-08-15 08:55:25 -07:00
Gabriel Ebner
4e2899e354
chore: remove nested trace api
2022-08-15 08:55:25 -07:00
Gabriel Ebner
ef223c02b8
feat: make trace class inheritance opt-in
2022-08-15 08:55:25 -07:00
Gabriel Ebner
847125d2e8
chore: remove global trace enabled flag
2022-08-15 08:55:25 -07:00
Gabriel Ebner
7e020d45e6
feat: add emoji helpers for trace messages
2022-08-15 08:55:25 -07:00
Gabriel Ebner
c7e45722a3
feat: trace nodes with messages
2022-08-15 08:55:25 -07:00
Leonardo de Moura
3896244c55
chore: cleanup
2022-07-25 22:39:56 -07:00
Leonardo de Moura
a62949c49b
refactor: add type LevelMVarId (and abbreviation LMarId)
...
Motivation: make sure we do not mixup metavariable ids for
expression and universe level.
cc @bollu
2022-07-24 17:21:45 -07:00
Mario Carneiro
f6211b1a74
chore: convert doc/mod comments from /- to /--//-! ( #1354 )
2022-07-22 12:05:31 -07:00
Gabriel Ebner
eda3eae18e
perf: implement Expr.update* in Lean
2022-07-19 05:55:13 -07:00
Gabriel Ebner
a8cab84735
refactor: use computed fields for Expr
2022-07-11 14:19:41 -07:00
Gabriel Ebner
eba400543d
refactor: use computed fields for Name
2022-07-11 14:19:41 -07:00
Gabriel Ebner
3176943750
refactor: use computed fields for Level
2022-07-11 14:19:41 -07:00
Leonardo de Moura
394d49da58
perf: Expr.hasSorry and similar functions
...
Functions were ignoring sharing while traversing `Expr`.
Addresses performance problem exposed by #1287
2022-07-10 07:39:38 -07:00
Leonardo de Moura
e4b358a01e
refactor: prepare to elaborate a[i] notation using typeclasses
2022-07-09 15:24:22 -07:00
Leonardo de Moura
c9771fa1b2
chore: unused variables
2022-07-07 20:24:18 -07:00
Leonardo de Moura
608a306ef0
refactor: simplify/cleanup DelayedMetavarAssignment
2022-07-06 15:24:17 -07:00
Leonardo de Moura
2446c64a99
chore: cleanup
2022-07-04 07:15:04 -07:00
Leonardo de Moura
a1413b8fa1
feat: cache failures at isDefEq
...
We can compile Lean with these changes, but 3 tests are still broken.
This cache is used to address a performance issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/deterministic.20timeout.20with.20structures/near/288180087
2022-07-03 21:52:01 -07:00
Sebastian Ullrich
2f67295c7d
feat: strengthen pp* signatures
2022-07-03 19:14:49 +02:00
Sebastian Ullrich
a12cde41e1
chore: work around macro limitations
...
It would be nice if `macro` was as expressive as syntax quotations, but
right now it's not.
2022-06-27 22:37:02 +02:00
Leonardo de Moura
96a72d67f2
fix: avoid unnecessary dependencies at mkMatcher
...
fixes #1237
2022-06-23 10:21:32 -07:00
Leonardo de Moura
2a940dd4ae
feat: add Expr.collectFVars, LocalDecl.collectFVars, Pattern.collectFVars, and AltLHS.collectFVars
...
They are all in `MetaM`.
These are helper functions for issue #1237 . We need to "cleanup" the
local context before trying to compile the match-expression.
see issue #1237
2022-06-22 15:53:43 -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
ae7b895f7a
refactor: unname some unused variables
2022-06-07 16:37:45 -07:00
Sebastian Ullrich
85e0e0ad20
doc: fix Expr.forEach' docstring
2022-06-05 14:16:29 +02:00
Leonardo de Moura
64c36fffda
feat: generate warning message if declaration has a non-synthetic sorry
...
closes #1163
2022-05-31 18:00:48 -07:00
Leonardo de Moura
be69d04af4
feat: add Declaration.hasSorry
2022-05-31 16:39:37 -07:00
Leonardo de Moura
c65537aea5
feat: Option is a Monad again
...
TODO: remove `OptionM` after update stage0
see: https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Do.20we.20still.20need.20OptionM.3F/near/279761084
2022-05-04 15:27:42 -07:00
Sebastian Ullrich
e1fbc04c3b
chore: accept unregistered syntax kinds in stage 1
2022-04-15 08:50:46 -07:00