Commit graph

19221 commits

Author SHA1 Message Date
Leonardo de Moura
76677049e2 chore: fix precedence of leading tokens 2020-02-04 09:44:43 -08:00
Sebastian Ullrich
52a0a0937e feat: check precedence of leading parsers as well 2020-02-04 07:49:33 -08:00
Leonardo de Moura
c763f72b79 chore: update stage0 2020-02-03 20:25:39 -08:00
Leonardo de Moura
1f359b9844 chore: remove unnecessary workaround
It is not needed anymore after we fixed the `app` parser
2020-02-03 20:25:09 -08:00
Leonardo de Moura
6be9a73e51 chore: update stage0 2020-02-03 20:15:00 -08:00
Leonardo de Moura
d75cd49ea2 fix: app parser
cc @kha
2020-02-03 20:13:38 -08:00
Leonardo de Moura
2138a11480 feat: use custom error messages at checkRBPGreater 2020-02-03 18:30:22 -08:00
Leonardo de Moura
bf15530c49 chore: update stage0 2020-02-03 18:21:33 -08:00
Leonardo de Moura
99f7aff491 fix: liftMethod notation 2020-02-03 17:12:44 -08:00
Leonardo de Moura
31bb6a1dec feat: extend tryCoeAndLift
Add combined coe+lift case.
2020-02-03 14:30:13 -08:00
Leonardo de Moura
a75d93b252 chore: update stage0 2020-02-03 14:13:43 -08:00
Leonardo de Moura
bcfaeaceab feat: change ite and dite argument order
Motivation: make sure `propagateExpectedType` heuristic is applied in
the new frontend when processing them.
2020-02-03 14:11:29 -08:00
Leonardo de Moura
a474850f5e feat: use automatic liftM at ensureHasType 2020-02-03 13:06:36 -08:00
Leonardo de Moura
48acc748ef feat: improve automatic liftM at do blocks
We now don't need to use `decide` in the following example:

```
def pred (x : Nat) : IO Bool := do
pure $ decide $ (← g 1) > 0
```
2020-02-03 12:16:57 -08:00
Leonardo de Moura
ba915d90f5 feat: do not enable constApprox in the combinator approxDefEq 2020-02-03 11:50:40 -08:00
Leonardo de Moura
a134db5e07 feat: add Coe instances for monads 2020-02-03 11:41:00 -08:00
Leonardo de Moura
330aa59356 chore: update stage0 2020-02-03 09:49:31 -08:00
Sebastian Ullrich
4279df4170 perf: special-case antiquotation syntax in Pratt parser to avoid choice nodes
fixes #99
2020-02-03 09:43:41 -08:00
Leonardo de Moura
17cc925115 feat: change liftMethod notation
cc @Kha
2020-02-03 09:38:05 -08:00
Sebastian Ullrich
fdfbb9a435 chore: lean4-mode: remove '.' from symbol table 2020-02-03 16:37:02 +01:00
Sebastian Ullrich
b76be34119 chore: fix test 2020-02-03 16:36:37 +01:00
Leonardo de Moura
f8bfe88d6b fix: consume unnecessary let-decls at isDefEq
Make sure we solve unification constraints such as `(let x := v; ?m) =?= ?m`
2020-02-02 21:54:44 -08:00
Leonardo de Moura
2ad065eb93 feat: add expandNonAtomicExplicitSource and getStructName 2020-02-02 21:24:14 -08:00
Leonardo de Moura
7b1a4272f8 chore: update stage0 2020-02-02 17:39:35 -08:00
Leonardo de Moura
f40129ad8d fix: precedence 2020-02-02 17:37:46 -08:00
Leonardo de Moura
c6b3b1f6f0 chore: add StructInst skeleton 2020-02-02 17:36:43 -08:00
Leonardo de Moura
4427d4468b feat: add modifyOp 2020-02-02 17:30:56 -08:00
Leonardo de Moura
cdb7e0cfae feat: add structInstLVal 2020-02-02 17:30:36 -08:00
Leonardo de Moura
2abfa1bcff fix: closes #108 2020-02-01 23:17:00 -08:00
Leonardo de Moura
8487216b1e feat: fallback to constApprox when foApprox fails 2020-02-01 22:50:29 -08:00
Leonardo de Moura
8de49b157c feat: add new approximation at isDefEq 2020-02-01 22:38:58 -08:00
Leonardo de Moura
6252b07735 refactor: make sure CheckAssignmentM can use MetaM 2020-02-01 21:29:23 -08:00
Leonardo de Moura
a7c8978d81 feat: insert liftM automatically in do notation when needed
@Kha The new example demonstrates the feature in action.
I added a comment explaining why it is more effective than relying on coercions.
2020-02-01 17:33:04 -08:00
Leonardo de Moura
57f62c4bec chore: use MacroM 2020-02-01 14:47:10 -08:00
Leonardo de Moura
460dcfec19 chore: update stage0 2020-02-01 01:04:38 -08:00
Leonardo de Moura
a370eb3167 feat: try macros first at elabCommand 2020-02-01 01:03:35 -08:00
Leonardo de Moura
cd4ec6313e chore: try macros first 2020-02-01 00:53:49 -08:00
Leonardo de Moura
ca919c2021 refactor: move instance to LeanInit 2020-02-01 00:52:52 -08:00
Leonardo de Moura
3dfc93550a feat: add liftMacroM
We implement `expandDoElems` using `MacroM`.
2020-02-01 00:26:42 -08:00
Leonardo de Moura
f8b9ea898a chore: update stage0 2020-02-01 00:13:29 -08:00
Leonardo de Moura
b332d5e74d feat: add proper withFreshMacroScope to MacroM
This is useful, for example, for users that want to write recursive
procedural macros.
2020-02-01 00:12:13 -08:00
Leonardo de Moura
d8c738bef8 feat: elaborate do notation 2020-01-31 20:11:06 -08:00
Leonardo de Moura
4b0284778c feat: expand ^(...) notation 2020-01-31 18:21:28 -08:00
Leonardo de Moura
63e8429f88 chore: update stage0 2020-01-31 17:40:50 -08:00
Leonardo de Moura
34a6029a28 feat: expand do elements 2020-01-31 17:39:32 -08:00
Leonardo de Moura
adc8b7f447 chore: missing attribute 2020-01-31 17:39:20 -08:00
Leonardo de Moura
9a505a0900 chore: name instance 2020-01-31 17:39:00 -08:00
Leonardo de Moura
90c75cdc41 chore: update stage0 2020-01-31 14:43:37 -08:00
Leonardo de Moura
398aa32f4d refactor: move elabDo to its own file 2020-01-31 14:40:58 -08:00
Leonardo de Moura
b604eb997a feat: add lift notation
@Kha The motivation is to avoid conflicts with the power operator.
I am assuming users will write `2^n` and `2^(n+1)`. So, we can't use
the space sensitiviy trick nor the token `^(`. So, I am using `(^` for
now.
2020-01-31 14:37:39 -08:00