Leonardo de Moura
3f32d9eb0b
fix: closes #111
2020-01-30 14:09:47 -08:00
Leonardo de Moura
50327205c9
chore: erase macro scopes
...
cc @Kha
2020-01-30 12:22:27 -08:00
Leonardo de Moura
2f0ac98b51
feat: extend scope of cdot notation
2020-01-30 11:42:37 -08:00
Leonardo de Moura
5152744652
chore: update stage0
2020-01-30 11:03:19 -08:00
Leonardo de Moura
fe6502493b
chore: use macros instead of elab
...
@Kha The motivation is to avoid code duplication. The `match`
elaborator will need a `elabPattern`. We can use the macros for
`elabTerm` and `elabPattern`.
2020-01-30 10:58:23 -08:00
Leonardo de Moura
21249b29a9
chore: update stage0
2020-01-30 10:22:47 -08:00
Leonardo de Moura
5d3db23d4b
chore: remove hack
2020-01-30 10:10:46 -08:00
Leonardo de Moura
38cfa1dcb6
feat: add elabMatch skeleton
2020-01-30 10:02:15 -08:00
Leonardo de Moura
018891b168
fix: subgoal order at hasMonadLiftTTrans
2020-01-30 09:58:21 -08:00
Leonardo de Moura
d11c2321c8
chore: precedence of nested parsers
2020-01-30 08:58:49 -08:00
Sebastian Ullrich
470e1623de
chore: hide "expected '$'"
2020-01-30 08:56:14 -08:00
Sebastian Ullrich
b818994bbe
fix: do not swallow errors from parser interpreter
...
@leodemoura I think we should only use `throwUnsupportedSyntax` in the
top level `match_syntax` of a transformer/elaborator
2020-01-30 08:56:14 -08:00
Sebastian Ullrich
9160c561c1
feat: postfix syntax for optional syntax parser
2020-01-30 08:56:14 -08:00
Leonardo de Moura
0c4030137f
feat: simplify Coe again
...
Users may add the expensive instances if they want.
The goal is to make sure the default configuration is solid, and
covers all examples we really want to support.
cc @kha @dselsam
2020-01-29 22:08:42 -08:00
Leonardo de Moura
812c47d463
feat: simplify CoeFun and CoeSort
...
The main issue is nontermination for problems that do not have
solution. When using dependent coercions, we keep creating goals of
the form `CoeSort ... (coe (coe (coe ...))) ...`. Same for `CoeFun`.
I am considering simplifying it even further, and making sure
`CoeDep` can be used at most once in a sequence of coercions `CoeTC`.
Another option is to use a very small amount of fuel to
guarantee termination when solving coercion TC problems.
cc @Kha @dselsam
2020-01-29 21:56:26 -08:00
Leonardo de Moura
755e22c0ef
doc: document propagateExpectedType
2020-01-29 20:49:18 -08:00
Leonardo de Moura
f29a13323a
fix: forget to update
2020-01-29 20:08:03 -08:00
Leonardo de Moura
6793559896
fix: missing ensureHasType at elabLetDeclAux
2020-01-29 19:20:55 -08:00
Leonardo de Moura
8c0cc7b33b
fix: "function expected" error message
2020-01-29 19:17:44 -08:00
Leonardo de Moura
a656096c4b
feat: expected type propagation
2020-01-29 19:00:56 -08:00
Leonardo de Moura
dc567708a6
fix: prevent macroStack from appearing more than once in error messages
2020-01-29 18:09:41 -08:00
Leonardo de Moura
5c6e24be18
chore: better position for this kind of error
2020-01-29 16:30:02 -08:00
Leonardo de Moura
b00c04c491
fix: missing ensureHasType
2020-01-29 16:29:48 -08:00
Leonardo de Moura
29320145b9
fix: missing withMacroExpansion
2020-01-29 15:51:58 -08:00
Leonardo de Moura
81e363b13e
feat: add withPtrEq and withPtrAddr
2020-01-29 04:31:10 -08:00
Leonardo de Moura
400a9c45c1
test: CoeSort test
2020-01-29 03:57:27 -08:00
Leonardo de Moura
db8eaad410
fix: propagate only
2020-01-29 03:50:21 -08:00
Leonardo de Moura
1eb6abdc15
chore: use CoeT
2020-01-29 03:49:02 -08:00
Leonardo de Moura
c048a3f573
fix: Level.normalize
2020-01-29 03:38:35 -08:00
Leonardo de Moura
9bc07254a1
feat: add support for CoeSort
2020-01-29 02:34:35 -08:00
Leonardo de Moura
df5afdac5d
chore: update stage0
2020-01-28 19:08:09 -08:00
Leonardo de Moura
6a046a11c2
chore: remove coeSortBool
...
It is interacting with new `Coe`.
We can add it back at `Coe.lean` after we remove `HasCoe.lean`
2020-01-28 19:07:02 -08:00
Leonardo de Moura
9a845f5bd6
chore: update stage0
2020-01-28 18:25:22 -08:00
Leonardo de Moura
c33cd11be1
feat: add CoeHead and CoeTail to minimize nontermination
...
The adventure continues.
cc @Kha @dselsam
2020-01-28 18:20:58 -08:00
Leonardo de Moura
55bb0805b2
feat: handle attribute inferTCGoalsLR
2020-01-28 18:01:35 -08:00
Leonardo de Moura
f2a32e5985
feat: tag coeFunTrans and coeSortTrans with [inferTCGoalsLR]
2020-01-28 17:19:21 -08:00
Leonardo de Moura
f81027f995
chore: update stage0
2020-01-28 17:13:54 -08:00
Leonardo de Moura
8c34ccf829
feat: add attribute inferTCGoalsLR
...
@Kha I didn't find any workaround for the instance
```lean
instance coeFunTrans {α : Sort u} {β : Sort v} {γ : Sort w} (a : α) [CoeT α a β] [CoeFun β (coe a) γ] : CoeFun α a γ :=
```
`γ` is an output param. Thus, it is just a metavariable, and if we use
the default order, the subgoal `CoeFun ?β (coe ?a) ?γ` is really bad.
We need to go from left to right here.
2020-01-28 17:08:51 -08:00
Leonardo de Moura
a7de10a74a
feat: add support for CoeFun in the new elaborator
...
cc @kha
2020-01-28 16:50:53 -08:00
Leonardo de Moura
4aa710d4a6
feat: add bridge Coe + HasNat transitivity instance
...
cc @kha @dselsam
2020-01-28 16:17:14 -08:00
Leonardo de Moura
8c7aade7b6
feat: add coercion tests
2020-01-28 15:52:04 -08:00
Leonardo de Moura
2a89bcd931
feat: use Coe in the new frontend
2020-01-28 15:51:36 -08:00
Leonardo de Moura
d3cb5b832c
fix: handle delayed assignments at isDefEqQuick
2020-01-28 15:09:16 -08:00
Leonardo de Moura
2df230e7a8
feat: missing instance
2020-01-28 14:09:04 -08:00
Leonardo de Moura
a9c06230b2
chore: update stage0
2020-01-28 13:11:04 -08:00
Leonardo de Moura
e9e4dfe1ff
feat: add new Coe.lean
2020-01-28 13:10:30 -08:00
Leonardo de Moura
07bfeab6be
feat: add CoeFun and CoeSort to new Coe prototype
2020-01-28 12:57:14 -08:00
Leonardo de Moura
2efdeda903
fix: bug at preprocessArgs
2020-01-28 12:56:01 -08:00
Leonardo de Moura
9eb1723680
fix: outParam support
2020-01-28 11:13:32 -08:00
Leonardo de Moura
ef51d6c2ab
chore: improve error message
2020-01-28 10:56:14 -08:00