Commit graph

158 commits

Author SHA1 Message Date
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
Leonardo de Moura
43812444a7 chore: Hashable => HashableUSize 2021-06-02 07:24:26 -07:00
Leonardo de Moura
6a87bba9c0 chore: mixHash => mixUSizeHash 2021-06-02 07:05:42 -07:00
Leonardo de Moura
a247249880 feat: add configuration option for disabling proof irrelevance at MetaM 2021-05-27 13:37:26 -07:00
Leonardo de Moura
0e1f645b07 fix: fixes #450 2021-05-10 13:55:06 -07:00
Leonardo de Moura
d68d1f0841 fix: fixes #423 2021-04-25 10:00:38 -07:00
Leonardo de Moura
aaa072cf21 feat: add withNewBinderInfos 2021-04-16 09:59:40 -07:00
Daniel Fabian
cb18af6184 feat: add withLocalDecls and withLocalDeclsD
They are array versions of `withLocalDecl` and `withLocalDeclD`, respectively. They are useful when you need to create variables dynamically.
2021-04-16 07:54:04 -07:00
Leonardo de Moura
2694e7798a refactor: add MonadBacktrack
The new class specifies an interface for saving and restoring the
backtrackable part of the state.
This commit also fixes a few issues.

- `commitWhen` at `LevelDefEq` was defining a checkpoint for
  the `isDefEq` methods, and it affects how postponed universe
  constraints are handled. However, the name suggests it is
  similar to `commitWhenSome?`, and consequently it was used
  in other places that had nothing to do with `isDefEq`.
  So, I renamed it, and provided the generic `commitWhen` at the new
  `MonadBacktrack.lean` file.

- We were restoring more state then needed in a few places.
  For example, we were discarding all caches.

- At `SyntheticMVars.lean`, we were using the `Meta.commitWhenSome?`
  method which does not restore the `Term.State`.
2021-04-11 19:10:41 -07:00
Sebastian Ullrich
1b1ac393d8 fix: do not try to pretty-print unknown metavariables
Fixes #380
2021-04-08 18:16:05 +02:00
Leonardo de Moura
566fad77d4 chore: helper methods 2021-03-27 18:48:03 -07:00
Leonardo de Moura
865316bbf9 feat: improve error message when stuck solving universe constraints
closes #343
2021-03-11 17:46:44 -08:00
Leonardo de Moura
be841a7cad chore: throwError! => throwError, throwErrorAt! => throwErrorAt
@Kha I marked the corresponding methods as `protected`.
I currently can't stand `throw_error`, and I am optimistic about
server highlighting feature you are working on :)
2021-03-11 11:59:45 -08:00
Leonardo de Moura
08fc25217d chore: cleanup, fix docs 2021-03-07 09:01:54 -08:00
Leonardo de Moura
3850b1a9aa perf: workaround for increasing the number of destructive updates
See 4908eaf396
2021-02-21 16:22:53 -08:00
Leonardo de Moura
50b6561f8f chore: cleanup 2021-02-21 14:04:00 -08:00
Leonardo de Moura
bb2ca97df9 refactor: add options for controlling whether variables are included or not at mkLambdaFVars and mkForallFVars 2021-02-17 13:49:27 -08:00
Leonardo de Moura
761b64c929 fix: missing occursCheck at SyntheticMVars
fixes #301
2021-01-29 17:13:04 -08:00
Leonardo de Moura
fdab5ca835 feat: add helper methods whnfR and whnfI 2021-01-25 17:18:08 -08:00
Leonardo de Moura
b575087859 fix: unfold class projections when using TransparencyMode.instances 2021-01-25 12:30:26 -08:00
Sebastian Ullrich
0c91b3769e chore: replace variables in src/ 2021-01-22 14:36:05 +01:00
Leonardo de Moura
b6abf19656 fix: unfold abbreviations only
For example, we should not reduce types of the form `let x := ...; ...`
2021-01-12 08:11:04 -08:00