Commit graph

26741 commits

Author SHA1 Message Date
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
Leonardo de Moura
61f5bdf09b feat: MutQuot basic definition 2020-01-31 10:56:15 -08:00
Leonardo de Moura
3d0bfcd36a fix: assertion violation 2020-01-31 08:25:59 -08:00
Leonardo de Moura
2f74415eaf chore: update stage0 2020-01-30 20:57:42 -08:00
Leonardo de Moura
21618361b7 refactor: remove ParserKind 2020-01-30 20:56:46 -08:00
Leonardo de Moura
983aa22d8a chore: update stage0 2020-01-30 20:41:55 -08:00
Leonardo de Moura
6b1e64d7ea chore: prepare for refactoring 2020-01-30 20:41:10 -08:00
Leonardo de Moura
54bdddb98f fix: toParserDescrAux 2020-01-30 20:38:14 -08:00
Leonardo de Moura
6a3e4f45ca chore: update stage0 2020-01-30 19:05:07 -08:00
Leonardo de Moura
31ebccea58 chore: remove ParserDescr.pushLeading 2020-01-30 19:04:07 -08:00
Leonardo de Moura
f8dd8d80cc chore: update stage0 2020-01-30 18:34:52 -08:00
Leonardo de Moura
410d295429 refactor: remove unnecessary pushLeading, add ParserDescr.trailingNode 2020-01-30 18:32:28 -08:00
Leonardo de Moura
89e09a0766 chore: update stage0 2020-01-30 17:32:49 -08:00
Leonardo de Moura
72ff3da6cd refactor: preparing to remove ParserKind 2020-01-30 17:31:53 -08:00
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