Commit graph

28591 commits

Author SHA1 Message Date
Leonardo de Moura
2fcb784372 feat: default value for coeAtOutParam parameter 2022-07-06 19:00:32 -07:00
Leonardo de Moura
01d0ca8cfe doc: coeAtOutParam todo's 2022-07-06 18:58:40 -07:00
Leonardo de Moura
f8c7bd71aa fix: position information for toStream application at do-notation 2022-07-06 18:50:45 -07:00
Leonardo de Moura
c5e00c2bde fix: do not create coercion placeholder if function is partially applied 2022-07-06 18:38:11 -07:00
Leonardo de Moura
645c3e777d feat: disable coeAtOutParam when @ (aka explicit = true) is used 2022-07-06 18:31:39 -07:00
Leonardo de Moura
0425fabf8f test: test for output parameter + coercion issue 2022-07-06 16:55:08 -07:00
Leonardo de Moura
42548adc5d fix: typo at addImplicitArg 2022-07-06 16:53:57 -07:00
Leonardo de Moura
9ba65fee83 fix: a coercion around an output parameter (and promotion to synthetic opaque) should only be used if there in no other way to infer parameter
We need this refinement for declarations such as
```
def add_one {X} [Trait X] [One (Trait.R X)] [HAdd X (Trait.R X) X] (x : X) : X := x + (One.one : (Trait.R X))
```
from test 948.lean
2022-07-06 16:38:39 -07:00
Leonardo de Moura
ab16278ce4 fix: missing synthesizeSyntheticMVars at elabSubst 2022-07-06 16:15:29 -07:00
Leonardo de Moura
aa9167834b fix: coeAtOutParam can only be used after Coe.lean 2022-07-06 16:06:11 -07:00
Leonardo de Moura
55ad7beb8d feat: add coercion placeholder for applications that return an output parameter of a local instance 2022-07-06 15:42:39 -07:00
Leonardo de Moura
e7bc114ba2 fix: bug at withAssignableSyntheticOpaque 2022-07-06 15:24:17 -07:00
Leonardo de Moura
ec4794ad10 chore: use withAssignableSyntheticOpaque 2022-07-06 15:24:17 -07:00
Leonardo de Moura
608a306ef0 refactor: simplify/cleanup DelayedMetavarAssignment 2022-07-06 15:24:17 -07:00
Leonardo de Moura
81ed8b0b32 chore: cleanup 2022-07-06 15:24:17 -07:00
Sebastian Ullrich
d679044a9b chore: Nix: use --deps-json for faster, single IFD per package 2022-07-06 16:12:30 +02:00
Sebastian Ullrich
ec991f3761 chore: update stage0 2022-07-06 16:12:30 +02:00
Sebastian Ullrich
775ed70a84 feat: add lean --print-deps-json 2022-07-06 16:12:30 +02:00
Sebastian Ullrich
a16eff2996 chore: Nix: implement roots 2022-07-06 16:12:30 +02:00
Leonardo de Moura
38e1f6ba82 fix: missing instantiateMVars 2022-07-05 20:45:53 -07:00
Leonardo de Moura
0a5df7cd6d chore: style 2022-07-05 20:45:53 -07:00
tydeu
6e4bca57c8 chore: update Lake 2022-07-05 17:27:41 -07:00
Leonardo de Moura
91d48c9150 chore: update stage0 2022-07-05 14:29:45 -07:00
Leonardo de Moura
627594b88a fix: "dot"-notation should apply default instances before failing
See new test for motivating example.
2022-07-05 14:27:55 -07:00
Leonardo de Moura
13a49da496 chore: update stage0 2022-07-05 13:25:50 -07:00
Leonardo de Moura
2b2d4245dc fix: extensible tactics bug
See comment at `expandMacros`
2022-07-05 13:20:22 -07:00
Siddharth Bhat
e6629b760d fix: Clearer error message for cast(▸) notation
The old error message said:

```
throwError "invalid `▸` notation,
expected type{indentExpr expectedType}\ndoes contain
equation left-hand-side nor right-hand-side{indentExpr heqType}"
```

The phrase `does contain ... nor ..` seems gramatically incorrect.
What was (probably) intended was `does **not** contain ... nor ...`.

We take the opportunity to clean up the error message and
be clearer that the equality does not contain the expected result type.
2022-07-05 09:01:09 -07:00
Sebastian Ullrich
6303fb77d2 fix: expansion info for macro commands
TODO: investigate that pp error
2022-07-05 13:18:59 +02:00
tydeu
bff560759e feat: add missing literal TSyntax helpers 2022-07-05 13:18:58 +02:00
Leonardo de Moura
2061c9bbea chore: reduce test size
TODO: investigate why there is a stack overflow in the CI.
I didn't manage to reproduce it on my machine.
2022-07-04 13:58:06 -07:00
Leonardo de Moura
ffc90f6a35 fix: bug at ll_infer_type 2022-07-04 13:55:55 -07:00
Leonardo de Moura
7668750cb5 chore: update stage0 2022-07-04 07:25:35 -07:00
Leonardo de Moura
1999db1d7c test: add test for performance issue
This issue has bee reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/deterministic.20timeout.20with.20structures/near/288180087
2022-07-04 07:20:12 -07:00
Leonardo de Moura
c434e4e096 chore: remove old tests 2022-07-04 07:18:07 -07:00
Leonardo de Moura
2446c64a99 chore: cleanup 2022-07-04 07:15:04 -07:00
Leonardo de Moura
64edb50687 chore: fix tests 2022-07-04 06:35:21 -07:00
Leonardo de Moura
f77ebae87f fix: withResetUsedAssignment 2022-07-04 06:33:42 -07:00
Leonardo de Moura
05a28af429 fix: skipDefEqCache 2022-07-04 06:33:32 -07:00
Leonardo de Moura
88fc0b2503 fix: isAssigned-like functions should set usedAssignment 2022-07-04 06:20:37 -07:00
Leonardo de Moura
6b2d2ffac6 fix: preserve usedAssignment flag when replacing MetavarContext 2022-07-04 05:49:54 -07:00
Leonardo de Moura
64d46272c2 fix: do not cache when smart unfolding is disabled 2022-07-04 05:48:35 -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
Leonardo de Moura
76245b39d1 chore: remove dead field
We have remove the old frontend a long time ago.
2022-07-03 15:38:48 -07:00
Leonardo de Moura
aae657571f doc: docstrings for src/Lean/Meta/Basic.lean 2022-07-03 15:32:15 -07:00
Leonardo de Moura
b78925d9bb chore: update stage0 2022-07-03 15:01:58 -07:00
Leonardo de Moura
757171db1f feat: add String.get! and s[i]! notation for String 2022-07-03 14:59:44 -07:00
Gabriel Ebner
07a3cd6980 chore: fix tests 2022-07-03 22:46:59 +02:00
Gabriel Ebner
141b110ff1 feat: add more typed syntax coercions 2022-07-03 22:46:59 +02:00
Gabriel Ebner
922ef23112 fix: do not ignore syntax coercions
Syntax coercions do not need to be the identity.  See for example
``Coe (TSyntax `ident) (TSyntax `declId)``.
2022-07-03 22:46:59 +02:00
Gabriel Ebner
ddf77a8c6d chore: style 2022-07-03 22:46:59 +02:00