Leonardo de Moura
e9e75af834
doc: Lean/Meta/Basic.lean
...
Add some docstrings
2022-06-30 13:32:19 -07:00
E.W.Ayers
cc9293af09
doc: isDefEq explain mvar levels
2022-06-24 15:24:52 -07:00
Leonardo de Moura
f6d1e48cb8
fix: constant => opaque issues
2022-06-14 17:19:54 -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
Leonardo de Moura
e997cd94c6
chore: style
2022-05-31 06:04:48 -07:00
Leonardo de Moura
6af1da450e
feat: disable only eta for classes during TC resolution
...
closes #1123
2022-04-26 08:20:39 -07:00
Leonardo de Moura
7d99f6f555
perf: isClassQuick? was incorrectly producing undef
...
Then `isClassExpensive?` was being invoked too often. In some
benchmarks the performance hit was substantial. For example,
in the new test `state8.lean`. The runtime on my machine went from 2s
to 0.76s.
2022-04-09 10:38:49 -07:00
Leonardo de Moura
6e02514eee
chore: style
2022-04-09 10:27:31 -07:00
Leonardo de Moura
cd0d7e676f
chore: rename renameMVar => setMVarUserName
2022-04-07 13:50:58 -07:00
Leonardo de Moura
46ce3013d0
feat: cleanup local context before elaborating match alternatives RHS
2022-03-29 18:52:07 -07:00
E.W.Ayers
534aa88188
doc: MetaM
2022-03-24 16:57:42 -07:00
Leonardo de Moura
6007147d71
fix: allow universes to be postponed further
...
closes #1058
2022-03-22 13:57:58 -07:00
Leonardo de Moura
3193acecfa
fix: flush the CoreM and MetaM caches at modifyEnv
...
This fix may impact performance. Note that we don't need to flush the
cache if we are "adding" stuff to the environment. We only need to
flush the caches if the change is not monotonic. BTW, most of the
changes are monotonic. I think this is why we did not hit this bug before.
We may also move all these caches to an environment extension. It is
an easy way to make sure we preserve the cache when extending the
environment.
I tried a few benchmarks and did not notice a significant difference.
cc @kha @gebner
fixes #1051
2022-03-17 16:02:30 -07:00
Leonardo de Moura
0bd9de1cb9
perf: add InstantiateLevelCaches for types and values at CoreM
2022-03-15 17:42:38 -07:00
Leonardo de Moura
ca253c43e1
refactor: pattern elaboration
...
We don't use the following hack anymore:
- /- HACK: `fvarId` is not in the scope of `mvarId`
- If this generates problems in the future, we should update the metavariable declarations. -/
- assignExprMVar mvarId (mkFVar fvarId)
This hack was corrupting the `InfoTree`.
2022-03-09 18:19:14 -08:00
Leonardo de Moura
50ae170bcc
feat: allow mkLambdaFVars and mkForallFVars to abstract unassigned metavars too
2022-03-09 11:27:58 -08:00
Leonardo de Moura
1263cea6af
feat: add support for unassigned metavariables at dependsOn
2022-03-09 11:27:58 -08:00
Leonardo de Moura
82bce7ebec
fix: declare local instaces occurring in patterns
2022-02-12 12:01:08 -08:00
Leonardo de Moura
123e0f42e9
feat: support partial and over applications at WF/PackDomain.lean
...
closes #1013
2022-02-11 09:28:17 -08:00
Leonardo de Moura
a028a69159
feat: cache isProp and isDecInst at FunInfo
2022-02-04 17:57:28 -08:00
Leonardo de Moura
bac91b9b5b
chore: remove arbitrary
2022-01-15 12:14:27 -08:00
Leonardo de Moura
b6fbdd8679
feat: add Meta.Context.canUnfold?
2021-12-18 08:25:56 -08:00
Leonardo de Moura
7b6732a137
refactor: ExprDefEq.lean and LevelDefEq.lean are now implementation only files
...
We use the export/extern idiom to define `isLevelDefEqAux`, and then
define the `isDefEq` user facing functions at `Meta/Basic.lean`.
2021-12-06 09:57:00 -08:00
Leonardo de Moura
7de749a23c
refactor: move setElabConfig to Elab directory
...
see #849
2021-12-06 08:12:59 -08:00
Sebastian Ullrich
80c3d88e3e
refactor: optimize critical import path
2021-12-06 08:05:24 -08:00
Leonardo de Moura
43217884c0
feat: add Meta.Config.etaStruct
...
It is useful to disable eta for structures for meta programs.
2021-11-25 11:31:00 -08:00
Leonardo de Moura
851ac3809e
feat: extend isInductivePredicate
2021-10-25 12:37:04 -07:00
Leonardo de Moura
91d2f6d4fc
feat: add cleanup tactic
2021-10-06 19:54:28 -07:00
Leonardo de Moura
def7641926
feat: add helper methods for checking dependencies
2021-10-06 19:04:02 -07:00
Leonardo de Moura
5fe40fbccf
refactor: add sortFVarIds to Meta/Basic.lean
2021-09-20 11:32:53 -07:00
Leonardo de Moura
0726b85adb
feat: add option for disabling Offset.lean
2021-09-12 18:37:25 -07:00
Leonardo de Moura
445cc3085f
refactor: avoid Name, MVarId, and FVarId confusion
2021-09-07 19:06:50 -07:00
Leonardo de Moura
3714cf16ec
refactor: lazy evaluation for <|>
...
see #617
2021-09-07 17:06:10 -07:00
Leonardo de Moura
55f01fb6e1
feat: elaborate binop_lazy%
2021-09-07 13:30:09 -07:00
Leonardo de Moura
5a7044365b
feat: add instances Alternative MetaM and Alternative TacticM
2021-08-22 22:29:09 -07:00
Leonardo de Moura
d0d7799a7b
doc: document (and rename) the new configuration option ignoreLevelMVarDepth
2021-08-18 20:38:18 -07:00
Leonardo de Moura
99e8a98f06
feat: allow universes metavariables from any depth to be assigned when ignoreLevelDepth is true
...
We set `ignoreLevelDepth` to true during type class resolution.
2021-08-18 20:20:51 -07:00
Sebastian Ullrich
16026e9edd
perf: restore monad instance specialization hack
2021-08-12 21:09:09 +02:00
Leonardo de Moura
d482212a1c
feat: add Meta.abstract
...
closes #474
2021-08-06 18:19:06 -07:00
Leonardo de Moura
a230fe2d06
fix: forallMetaTelescope issue
...
This commit incorporates the fix at PR #612 , and clean up
`Meta/Basic.lean` using Lean 4 features.
2021-08-06 09:47:10 -07:00
Leonardo de Moura
bcfc927799
fix: fixes #602
2021-08-05 16:14:04 -07:00
Leonardo de Moura
d1d7ce1839
feat: start support for strict implicit binder annotation
2021-08-03 18:42:15 -07:00
Leonardo de Moura
6e1620ca8d
refactor: replace IO.Ref with the extern/export hack at MetaM
2021-08-03 11:50:57 -07:00
Daniel Selsam
6940166db4
chore: rebase and rm rawPos
2021-08-03 09:13:18 +02:00
Daniel Selsam
89364b802b
feat: top-down heuristic delaboration
2021-08-03 09:13:18 +02:00
Leonardo de Moura
49a87ceb4d
feat: add basic isDefEq cache
2021-07-28 16:29:44 -07:00
Leonardo de Moura
6d05daf73b
feat: add flag for allowing synthetic opaque mvars to be assigned at isDefEq
...
See issue #492
TODO: add a mechanism for detecting new metavariables.
2021-07-27 17:58:08 -07:00
Sebastian Ullrich
380c6c285a
perf: specialize some monad instances
2021-06-17 11:25:58 +02:00
Leonardo de Moura
37da993032
chore: remove HashableUSize instances
2021-06-02 08:48:11 -07:00