Commit graph

294 commits

Author SHA1 Message Date
Leonardo de Moura
dbe376a45a chore: control code size explosion 2020-11-03 17:20:52 -08:00
Leonardo de Moura
69abb0a35a feat: avoid unnecessary whnfs at unifyEqs 2020-11-03 17:20:52 -08:00
Leonardo de Moura
68ef8655bb feat: improve getElimInfo 2020-11-02 18:45:52 -08:00
Leonardo de Moura
7d752353a1 feat: add getElimInfo 2020-11-02 17:51:18 -08:00
Leonardo de Moura
1bec9ac3e0 feat: add generalizeTargets and more general unifyEqs 2020-11-02 17:43:43 -08:00
Leonardo de Moura
7b5f283507 chore: remove Expr.localE constructor
It was used by the old frontend
2020-11-01 09:37:48 -08:00
Leonardo de Moura
eb2b1d56eb chore: argument name 2020-11-01 08:03:37 -08:00
Leonardo de Moura
de8f8f0e28 feat: improve local context reduction approximation 2020-10-31 19:19:18 -07:00
Leonardo de Moura
8c9f148e2f chore: use new termFor, termReturn, termTry, and tryUnless 2020-10-31 19:19:18 -07:00
Leonardo de Moura
77b160a5a8 chore: use mkFreshUserName at generalizeTelescope 2020-10-31 19:19:17 -07:00
Leonardo de Moura
3101b83f98 fix: missing do 2020-10-30 18:15:37 -07:00
Leonardo de Moura
870f9a6215 fix: use robust matchEq? 2020-10-30 17:28:08 -07:00
Leonardo de Moura
6858cb5fb6 chore: cleanup 2020-10-29 10:24:16 -07:00
Leonardo de Moura
13a3215d0d chore: use Subarray combinators 2020-10-28 19:52:59 -07:00
Leonardo de Moura
4ba21ea10c chore: cleanup src/Array/Basic.lean 2020-10-28 19:35:42 -07:00
Leonardo de Moura
898a08a0c1 chore: avoid Has prefix in type classes
closes #203
2020-10-27 18:29:19 -07:00
Leonardo de Moura
97c93ec557 chore: prepare to rename 2020-10-27 18:09:03 -07:00
Leonardo de Moura
ff493751b5 chore: HasFormat ==> ToFormat 2020-10-27 16:19:14 -07:00
Leonardo de Moura
10c32fcf94 chore: HasToString => ToString 2020-10-27 16:11:48 -07:00
Leonardo de Moura
5ea49c92bb chore: cleanup 2020-10-27 13:26:21 -07:00
Leonardo de Moura
633578cfaf chore: use StateRefT macro 2020-10-27 13:05:12 -07:00
Leonardo de Moura
c979d81934 refactor: add polymorphic methods for updating/querying reducibility status 2020-10-26 17:07:28 -07:00
Leonardo de Moura
bddc826648 chore: remove unnecessary liftMs 2020-10-26 16:27:45 -07:00
Leonardo de Moura
79609938a8 feat: allow universe constraints to be postponed longer
Before this commit, each `isDefEq u v` invocation would fail if there
were pending universe level constraints. This commit, moves the
postponed universe constraints back to the `MetaM` state.
It also adds the combinator
```lean
withoutPostponingUniverseConstraints x
```
which executes `x` and throws an error if there are pending universe
constraints. We use the combinator at `elabApp` and `elabBinders`.
Without this commit, we would fail to elaborate simple terms such as
```lean
  Functor.map Prod.fst (x s)
```
because after elaborating `Prod.fst` and trying to ensure its type
match the expected one, we would be stuck at the universe constraint:
```
  u =?= max u ?v
```

Another benefit of the new approach is better error messages. Instead
of getting a mysterious type mismatch constraint, we get a list of
universe contraints the system is stuck at.

cc @Kha
2020-10-26 15:50:05 -07:00
Leonardo de Moura
5481999560 chore: cleanup 2020-10-26 14:25:38 -07:00
Leonardo de Moura
91d51d06e0 chore: cleanup 2020-10-26 14:00:13 -07:00
Leonardo de Moura
13c2a8ff51 chore: remove #lang lean4 header 2020-10-25 09:54:07 -07:00
Leonardo de Moura
3f0cc1d2ec fix: library/constructions primitives crash at kernel_exception 2020-10-24 18:52:01 -07:00
Leonardo de Moura
6ccf086b99 fix: modify mkAppM behavior and fix issue at Structural.lean
`Structural.lean` uses `mkAppM` for creating projections `PProd.fst`
and `PProd.snd`. However, given `x : (([Decidable p] → Bool) × Nat`,
the old ``mkApp `PProd.fst #[x]`` returned
```
Prod.fst ([Decidable p] → Bool) Nat x _inst
```
The extra unexpected argument `_inst` broke `Structural.lean`.
In the new implementation, it returns
```
Prod.fst ([Decidable p] → Bool) Nat x
```
which has type `[Decidable p] → Bool`.
2020-10-24 13:25:51 -07:00
Leonardo de Moura
d89f559683 chore: fix definitions
See commit before update stage0 for explanation.
2020-10-24 07:27:25 -07:00
Leonardo de Moura
21757b2be9 feat: add helper option for fixing bootstrapping issue at src/Init/Data/Int/Basic 2020-10-23 11:13:04 -07:00
Leonardo de Moura
bebd5075fd chore: cleanup 2020-10-23 10:00:23 -07:00
Sebastian Ullrich
fc5f93331d feat: profile new frontend 2020-10-23 18:34:47 +02:00
Leonardo de Moura
bc8b78f481 chore: cleanup 2020-10-22 16:30:06 -07:00
Leonardo de Moura
620647f2f1 refactor: simplify MonadCache and generalize instantiateExprMVars 2020-10-22 16:30:06 -07:00
Leonardo de Moura
a5a153d1fb refactor: remove foldlFrom from PersistentArray and LocalContext 2020-10-22 16:30:05 -07:00
Leonardo de Moura
43fbfec1fd chore: avoid Array.iterate and Array.iterateM 2020-10-22 16:30:04 -07:00
Leonardo de Moura
af968c60e6 chore: cleanup 2020-10-22 07:32:23 -07:00
Sebastian Ullrich
4e8f4fcaef refactor: extract AttributeImplCore, introduce ParametricAttributeImpl 2020-10-22 11:59:55 +02:00
Leonardo de Moura
82ee2e361b chore: cleanup 2020-10-21 18:43:47 -07:00
Leonardo de Moura
ea829b75c0 chore: remove coercions for old frontend 2020-10-21 17:37:35 -07:00
Leonardo de Moura
299a89e2c0 fix: missing instantiateMVars 2020-10-20 14:43:32 -07:00
Leonardo de Moura
dcd3068b42 chore: improve error messages 2020-10-20 14:22:01 -07:00
Leonardo de Moura
80a0200ab2 chore: move to new frontend
@Kha another significant milestone: all files at `src/Lean/Meta` are
being compiled with the new frontend.
2020-10-20 10:59:02 -07:00
Leonardo de Moura
8d8e8f7556 chore: move to new frontend 2020-10-20 09:33:50 -07:00
Leonardo de Moura
ddf4669d5d chore: move to new frontend 2020-10-20 09:33:50 -07:00
Leonardo de Moura
27205ddff7 chore: move to new frontend 2020-10-20 09:33:50 -07:00
Leonardo de Moura
8dffd752a8 chore: move to new frontend 2020-10-20 09:33:50 -07:00
Leonardo de Moura
1b6d1a83c7 chore: move to new frontend 2020-10-20 09:33:50 -07:00
Leonardo de Moura
69dfb23805 chore: move to new frontend 2020-10-19 15:43:32 -07:00