Leonardo de Moura
2ebee8d00c
fix: missing addJP
2020-12-08 12:09:52 -08:00
Leonardo de Moura
702c258773
fix: index out of bounds
...
@Kha Please take a look at `Traverser` and check whether the
workaround is appropriate or not.
2020-12-08 11:44:10 -08:00
Leonardo de Moura
6a41d04827
fix: missing panics
2020-12-08 10:36:53 -08:00
Leonardo de Moura
825bc3aa65
doc: array
2020-12-08 10:36:47 -08:00
Leonardo de Moura
ebf4a8877e
chore: mark Neg Int as a default instance
2020-12-08 10:09:58 -08:00
Leonardo de Moura
1509a1ab18
doc: builtin types
2020-12-08 10:09:58 -08:00
Sebastian Ullrich
a20f7a2e8e
chore: Elab.Quotation: avoid non-builtin syntax
2020-12-08 18:03:21 +01:00
Sebastian Ullrich
037144d3bd
refactor: Delaborator.Builtins: eliminate remainder of manual syntax
2020-12-08 17:53:58 +01:00
Sebastian Ullrich
3c9619ed09
feat: Syntax.isNone: return true on missing
2020-12-08 17:33:51 +01:00
Sebastian Ullrich
e6493755e9
chore: stdlib: match_syntax ~> match
2020-12-08 17:32:02 +01:00
Sebastian Ullrich
194e635a6e
chore: update stage0
2020-12-08 17:24:47 +01:00
Sebastian Ullrich
290e1cf15f
feat: syntax_match: check arity only for nullKind nodes
2020-12-08 17:20:36 +01:00
Sebastian Ullrich
00e167b2f0
feat: match_syntax ~> match
2020-12-08 17:20:36 +01:00
Sebastian Ullrich
6fac0c0b16
feat: support syntax patterns in do
2020-12-08 17:20:36 +01:00
Sebastian Ullrich
93a9d79088
refactor: move around quotation helpers once more
2020-12-08 17:20:36 +01:00
Sebastian Ullrich
dcd3b90522
chore: update stage0
2020-12-08 17:16:00 +01:00
Sebastian Ullrich
32eeac88c8
fix: ensure matchAlts have same shape with and without optionalFirstBar
2020-12-08 17:13:32 +01:00
Sebastian Ullrich
6fc03d0f29
feat: quotation scopes in match_syntax
2020-12-08 17:13:32 +01:00
Sebastian Ullrich
c63b770a7c
refactor: reduce dependencies on Lean.Elab.Quotation
2020-12-08 17:13:32 +01:00
Sebastian Ullrich
73ae39313d
fix: Nix: better stage 0 detection
2020-12-08 17:13:32 +01:00
Sebastian Ullrich
b12be950bf
feat: support complex antiquotations in antiquotation scopes
2020-12-08 17:13:32 +01:00
Leonardo de Moura
12e22cf439
chore: update stage0
2020-12-08 06:24:17 -08:00
Leonardo de Moura
ae5aa51712
chore: add explicit discard
2020-12-08 06:18:18 -08:00
Leonardo de Moura
071c0fdcec
chore: update stage0
2020-12-08 06:18:18 -08:00
Leonardo de Moura
06ad52575a
feat: force users to use discard when action result is not being bound and it is not PUnit
...
After this commit, we have to use an explicit `discard` in code such as
```
def g (x : Nat) : IO Nat := ...
def f (x : Nat) : IO Unit := do
discard <| g x -- type error without the `discard`
IO.println x
```
Motivation: prevent users from making mistakes such as
```
def f (xs : Array Nat) : IO Unit := do
xs.set! 0 1
IO.println xs
```
when they meant to write
```
def f (xs : Array Nat) : IO Unit := do
let xs := xs.set! 0 1
IO.println xs
```
2020-12-08 06:14:48 -08:00
Leonardo de Moura
6dddcde25c
chore: increase priority of defaultInstance for heterogeneous operators
...
@Kha The motivation is to allow users to define default instances such as
```lean
@[defaultInstance 1]
instance : OfScientific Real where
...
```
Then, numerals such as `1.2` and `3.4e10` will be `Real` by default instead of `Float`.
2020-12-07 16:58:34 -08:00
Leonardo de Moura
eb11416edc
doc: auto bound implicit arguments
2020-12-07 16:38:55 -08:00
Leonardo de Moura
d4c67a6bf0
doc: implicit arguments
2020-12-07 16:12:16 -08:00
Leonardo de Moura
1c8432b814
doc: Type* as a macro
2020-12-07 15:14:52 -08:00
Leonardo de Moura
021d5804f8
doc: add deptypes section
2020-12-07 13:58:52 -08:00
Leonardo de Moura
7e4b7e1400
fix: getFunBinderIds
2020-12-07 12:15:55 -08:00
Leonardo de Moura
9eef4bc65c
chore: update stage0
2020-12-07 10:48:44 -08:00
Leonardo de Moura
cbf2b6c0db
feat: change synthinstance threshold
...
Before this commit, the threshold was the amount of "fuel".
Now, it is the maximum number of instances used to solve a TC problem.
We have two thresholds
- `maxInstSize`: default 128
- `maxCoeSize`: default 16. It is similar to `maxInstSize`, but used for automatic coercions.
cc @Kha
2020-12-07 10:45:08 -08:00
Leonardo de Moura
a08dcef4f6
chore: update stage0
2020-12-06 19:08:18 -08:00
Leonardo de Moura
6af3eac142
feat: add MonadStateCacheT based on StateT
2020-12-06 19:07:28 -08:00
Leonardo de Moura
906cb81319
feat: improve inferAppType
...
See comment at `Expr.instantiateRevRange`
2020-12-06 19:01:23 -08:00
Leonardo de Moura
32325838a3
chore: fix test
2020-12-06 19:00:24 -08:00
Leonardo de Moura
91dec25a35
fix: bug at runST and runEST
2020-12-06 18:52:28 -08:00
Leonardo de Moura
265b7571b4
chore: change checkCache type
2020-12-06 16:24:51 -08:00
Leonardo de Moura
d25f520143
feat: elaborate #reduce command
2020-12-06 10:54:57 -08:00
Leonardo de Moura
e2c934ccea
chore: update stage0
2020-12-06 09:33:26 -08:00
Leonardo de Moura
1c0943ad82
feat: add #reduce command parser
2020-12-06 09:32:25 -08:00
Leonardo de Moura
f15986a25d
fix: use levelMVarToParam at #check command
2020-12-06 09:28:41 -08:00
Leonardo de Moura
f33473a39e
chore: use exists notation
2020-12-05 16:50:01 -08:00
Leonardo de Moura
1aaf7c0778
feat: add SimpleScopedEnvExtension
...
`ParserExtension` will probably be the only case where we need the
general case.
2020-12-05 16:38:35 -08:00
Leonardo de Moura
f0372f724c
chore: remove unused attribute
2020-12-05 16:28:58 -08:00
Leonardo de Moura
44d0fe993a
feat: ensure scoped instances cannot be used outside namespaces
2020-12-05 16:26:31 -08:00
Leonardo de Moura
dcf5f855dd
test: scoped and local instances
2020-12-05 16:10:27 -08:00
Leonardo de Moura
926c7f34ef
chore: update stage0
2020-12-05 16:04:37 -08:00
Leonardo de Moura
533192c369
feat: implement instanceExtension using ScopedEnvExtension
2020-12-05 16:04:37 -08:00