Commit graph

19521 commits

Author SHA1 Message Date
Leonardo de Moura
36ebccb822 chore: fix tests 2022-07-09 15:59:44 -07:00
Leonardo de Moura
e4b358a01e refactor: prepare to elaborate a[i] notation using typeclasses 2022-07-09 15:24:22 -07:00
Leonardo de Moura
4c707d3b3c feat: use binop% to elaborate %-applications
Motivation: make sure the behavior is consistent with other arithmetic
operators.

This commit also removes the instance
```
instance : HMod (Fin n) Nat (Fin n) where
  hMod := Fin.modn
```
because we have a coercion from `Fin n` to `Nat`.
Thus, given `a : Fin n` and `b : Nat`, `a % b` is ambiguous.
2022-07-09 14:38:35 -07:00
Leonardo de Moura
305630cc23 fix: ElabAppArgs.finalize bug 2022-07-09 13:53:15 -07:00
Leonardo de Moura
0074038405 fix: missing term info 2022-07-09 12:19:10 -07:00
Leonardo de Moura
2f6eb84ace chore: cleanup 2022-07-09 12:06:29 -07:00
Leonardo de Moura
2873a1b250 chore: unused variable warningns 2022-07-09 07:52:59 -07:00
Leonardo de Moura
defff00787 chore: remove workaround 2022-07-09 07:47:05 -07:00
Sebastian Ullrich
61b01ea3b3 Revert "chore: work around for type inference"
This reverts commit 6c64b1b20b.
2022-07-09 10:47:38 +02:00
Leonardo de Moura
bdaabd4e7b feat: propagate return type to for-in block 2022-07-08 17:29:30 -07:00
Leonardo de Moura
71edf731f9 fix: missing withFreshMacroScope 2022-07-08 17:25:29 -07:00
Leonardo de Moura
eb06b90b17 chore: add workaround 2022-07-08 16:54:44 -07:00
Leonardo de Moura
39f598a3e1 chore: update Lake 2022-07-08 16:42:18 -07:00
Leonardo de Moura
d50b33175d feat: improve forIn elaborator element type propagation 2022-07-08 16:34:42 -07:00
Leonardo de Moura
7cf31f7360 chore: update comment 2022-07-08 15:34:09 -07:00
Leonardo de Moura
e4e0f775d6 feat: improve outParam as result type support 2022-07-08 15:29:48 -07:00
Sebastian Ullrich
32118a832d fix: update to adjusted Lake update 2022-07-08 23:24:30 +02:00
Leonardo de Moura
2472a6a1ea chore: fix build
Another ugly hack to survive until we port the code generator to Lean.
2022-07-08 10:34:50 -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
bf91956449 fix: add workaround for issue #1293
This is a temporary hack until we port the C++ code to Lean.

closes #1293
2022-07-07 23:39:35 -07:00
Leonardo de Moura
6ef81e1cdf fix: bug at the code specialization cache
closes #1292
2022-07-07 22:59:18 -07: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
dd924e5270 chore: remove codegen option
We should use `noncomputable` modifier instead.

closes #1288
2022-07-07 08:18:30 -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
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
627594b88a fix: "dot"-notation should apply default instances before failing
See new test for motivating example.
2022-07-05 14:27:55 -07:00