Commit graph

4899 commits

Author SHA1 Message Date
Leonardo de Moura
e4e0f775d6 feat: improve outParam as result type support 2022-07-08 15:29:48 -07:00
Sebastian Ullrich
d7bcc271be refactor: avoid nested sequence in simpleBinder 2022-07-08 19:06:10 +02:00
Sebastian Ullrich
75b0b50983 fix: backtrack on unexpected non-identifier in parenthesizer 2022-07-08 14:49:08 +02:00
Leonardo de Moura
c9771fa1b2 chore: unused variables 2022-07-07 20:24:18 -07:00
Leonardo de Moura
58619291e9 feat: better qualified name support in recursive definitions 2022-07-07 20:15:25 -07:00
Leonardo de Moura
db47664d4a fix: discrepancy between isDefEq and whnf for transparency mode instances 2022-07-07 15:39:58 -07:00
Leonardo de Moura
fce7697151 fix: def _root_ and dotted notation in recursive definitions
closes #1289
2022-07-07 07:57:51 -07:00
Sebastian Ullrich
305866dba2 feat: "linting" profiler metric 2022-07-07 14:23:59 +02:00
Sebastian Ullrich
29bdc0ceac fix: bound syntax kind at v:(ppSpace ident) etc. 2022-07-07 11:49:35 +02:00
Leonardo de Moura
0c30372f93 doc: add todo for expandDelayedAssigned 2022-07-06 20:08:12 -07:00
Leonardo de Moura
71550c55a9 fix: @ scope 2022-07-06 19:42:43 -07:00
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
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
775ed70a84 feat: add lean --print-deps-json 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
627594b88a fix: "dot"-notation should apply default instances before failing
See new test for motivating example.
2022-07-05 14:27:55 -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
Leonardo de Moura
2446c64a99 chore: cleanup 2022-07-04 07:15:04 -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
03ce7cb17c fix: dependent pattern matching bug
closes #1279
Originally reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/case.20in.20dependent.20match.20not.20triggering.20.28.3F.29/near/288328239
2022-07-03 13:25:12 -07:00
Leonardo de Moura
68024b11a4 fix: simp_all bug when goal has duplicate hypotheses 2022-07-03 12:44:53 -07:00
Sebastian Ullrich
2f67295c7d feat: strengthen pp* signatures 2022-07-03 19:14:49 +02:00
Sebastian Ullrich
146aefd085 feat: ppTactic 2022-07-03 19:00:13 +02:00
Leonardo de Moura
54c60d4c2d feat: a[i] and a[i]! notation for Subarrays 2022-07-02 15:54:34 -07:00
Leonardo de Moura
b3ea1fc925 feat: a[i] notation for arrays now uses i : Fin a.size 2022-07-02 15:19:38 -07:00
Leonardo de Moura
2ebcf29cde chore: use a[i]! for array accesses that may panic 2022-07-02 15:12:05 -07:00
Leonardo de Moura
3f3cd22366 feat: add Array.getOp! and Array.getOp?
Add warning when `Array.getOp` is used. TODO: replace `Array.getOp`
with safe version
2022-07-02 10:06:05 -07:00
Leonardo de Moura
e8935d996b chore: String.get?, String.getOp?, and remove String.getOp 2022-07-02 09:59:04 -07:00
Leonardo de Moura
053bc889a3 feat: elaborate a[i]! and a[i]? 2022-07-02 07:29:58 -07:00
Leonardo de Moura
131e7be8c5 feat: add a[i]? and a[i]! parsers 2022-07-02 07:29:58 -07:00