Commit graph

2799 commits

Author SHA1 Message Date
Mac Malone
6c07536b33 feat: simplified, improved class abbrev (+ tests) 2021-05-20 15:23:29 -07:00
Sebastian Ullrich
a02c6fd3eb chore: adapt stdlib & tests 2021-05-20 15:17:36 -07:00
Sebastian Ullrich
7c3101a51c chore: produce more efficient/pp-able array code from quotations 2021-05-19 09:52:35 +02:00
Sebastian Ullrich
23f0c1051c feat: improve ToString/Quote Name 2021-05-19 09:34:01 +02:00
Leonardo de Moura
54745bda71 feat: use new endPos field 2021-05-17 15:04:24 -07:00
Leonardo de Moura
eae1f5412b fix: bugs introduced in the previous commits 2021-05-17 15:00:51 -07:00
Leonardo de Moura
3b7bcdc449 feat: add endPos field to SourceInfo.original
We need an update stage0 before we use it.
2021-05-17 14:32:58 -07:00
Leonardo de Moura
ac90052139 feat: add option for controlling how deep we go when trying to discharge simp theorem hypotheses 2021-05-16 12:32:05 -07:00
Leonardo de Moura
4dabfef0e3 chore: remove done 2021-05-15 18:57:27 -07:00
Leonardo de Moura
c7096f54a2 feat: injectivity theorems for types defined in the prelude 2021-05-14 18:32:26 -07:00
Leonardo de Moura
f850820029 feat: add mkInjectiveTheorems 2021-05-13 22:09:50 -07:00
Leonardo de Moura
686b63c60f feat: mark Eq.ndrec as a simp lemma 2021-05-13 17:23:23 -07:00
Leonardo de Moura
449c92a1bd feat: add dite_True and dite_False simp lemmas 2021-05-13 17:21:49 -07:00
Leonardo de Moura
b52edf1259 fix: fixes #452
The new syntax is similar to `matchAlts` and uses `colGe`.
The first `|` is not optional anymore.
2021-05-10 17:28:10 -07:00
Leonardo de Moura
7d39a0d56c chore: prepare to change first syntax 2021-05-10 17:05:31 -07:00
Leonardo de Moura
8e81f03e3a chore: adjust stdlib to recent changes 2021-05-06 15:43:56 -07:00
Sebastian Ullrich
99864bbb31 chore: reintroduce as regular notation 2021-05-06 22:41:23 +02:00
Sebastian Ullrich
9ed8db4bc3 feat: add constructor tactic 2021-05-06 10:40:56 -07:00
Leonardo de Moura
7398db5f3f fix: rw final goal state 2021-05-04 16:58:44 -07:00
Sebastian Ullrich
5b02254297 fix: rw final goal state 2021-05-04 15:24:42 -07:00
Sebastian Ullrich
aabb4a50aa feat: remove bracket-less rw 2021-05-04 15:24:22 -07:00
Leonardo de Moura
6efb058e2c refactor: add Name.modifyBase 2021-05-03 10:06:20 -07:00
Sebastian Ullrich
e76fc17b0e fix: rw goal state positions 2021-05-03 14:14:12 +02:00
Leonardo de Moura
93189e0fce chore: prepare to change case tactic 2021-05-01 19:53:44 -07:00
Leonardo de Moura
ba5d622e59 chore: avoid case tactic 2021-05-01 19:50:50 -07:00
Leonardo de Moura
a2e8bc0780 feat: use binop% to define arith operators
closes #382
2021-04-30 19:40:45 -07:00
Leonardo de Moura
f75c9caf30 chore: disable check in the prelude inferInstance helper functions 2021-04-28 17:22:20 -07:00
Sebastian Ullrich
40b17bc364 refactor: introduce a few double-backtick quotations 2021-04-28 12:09:13 +02:00
Leonardo de Moura
920a2b2a14 perf: Ord USize instance and missing inline 2021-04-27 12:08:21 -07:00
Daniel Fabian
0238bf8c33 refactor: use Ordering inside of rbmap instead of lt. 2021-04-27 07:58:58 -07:00
Leonardo de Moura
74d613ab88 fix: safe instance for MethodsRef 2021-04-24 07:24:08 -07:00
Leonardo de Moura
b2190da468 feat: add Macro.resolveGlobalName and Macro.resolveNamespace? 2021-04-23 19:38:56 -07:00
Leonardo de Moura
d70f9c232c feat: trace support for MacroM
closes #184
2021-04-23 19:15:14 -07:00
Leonardo de Moura
c6e00aba63 chore: finalize Macro.Methods refactoring
We can now add new methods without using `update-stage0` multiple times.
2021-04-23 18:08:44 -07:00
Leonardo de Moura
d1dcf0b067 chore: cleanup
We still need another update stage0
2021-04-23 18:02:50 -07:00
Leonardo de Moura
9552b6c95f feat: add Macro.hasDecls and Macro.getCurrNamespace
We need update stage0, and cleanup
2021-04-23 17:51:28 -07:00
Leonardo de Moura
0838b95105 chore: add Macro.State.Extra 2021-04-23 16:22:32 -07:00
Leonardo de Moura
1151ef9af0 chore: add Macro.Methods 2021-04-23 16:22:32 -07:00
Leonardo de Moura
a5d1b8f3c5 chore: add Macro.State 2021-04-23 16:22:24 -07:00
Leonardo de Moura
c0da331e02 chore: remove temp code 2021-04-22 20:32:24 -07:00
Sebastian Ullrich
8895ed47e5 refactor: clean up Thunk
Fixes a bug in the native implementation of `Thunk.bind` by deleting it
2021-04-22 20:29:08 -07:00
Leonardo de Moura
3a80e87793 chore: #405 step 1 2021-04-22 20:03:48 -07:00
Leonardo de Moura
46e02bcdcc chore: fix stdlib 2021-04-16 21:59:44 -07:00
Leonardo de Moura
157ef80c5a feat: match auto generalization 2021-04-16 21:48:38 -07:00
Leonardo de Moura
bf4b9b0ccd fix: use noImplicitLambda% when defining tactic macros such as have, let, etc
Thus, we don't change the expected type when using them.
2021-04-12 23:01:47 -07:00
Leonardo de Moura
8917e08251 feat: add tactic macro unhygienic <tactic-seq> 2021-04-10 16:18:40 -07:00
Leonardo de Moura
7de9cfeac8 chore: fix StructInst and add mkGroupNode 2021-04-07 22:46:07 -07:00
Leonardo de Moura
578b3b822f fix: do not use nullKind for group combinator
We use `nullKind` for the `group` parser combinator.
When pattern matching `nullKind` nodes, we check their arities.
So, error recovery often fails for parsers that use the `group`
combinator.
For example, we have the parser
```
def whereDecls := leading_parser "where " >> many1Indent (group (letRecDecl >> optional ";"))
```
If there is syntax error at `letRecDecl`, the node corresponding to
```
group (letRecDecl >> optional ";")
```
will contain only one child, and the pattern matching at
```
def expandWhereDecls (whereDecls : Syntax) (body : Syntax) : MacroM Syntax :=
  match whereDecls with
  | `(whereDecls|where $[$decls:letRecDecl $[;]?]*) => `(let rec $decls:letRecDecl,*; $body)
  | _ => Macro.throwUnsupported
```
fails, and we can't elaborate the partial syntax tree for
`letRecDecl`, and auto-completion will not work there.

We address this issue by using a new kind for the `group` combinator.
The idea is to pattern match `group` as we pattern match `node`s with
proper syntax node kinds. This change is consistent with the way we
use `group` where it mainly a convenience for saving us the trouble of
defining a new parser definition that is used only once.
2021-04-07 22:30:51 -07:00
Leonardo de Moura
487bcaaf2b chore: remove dead coe 2021-04-06 19:11:59 -07:00
Leonardo de Moura
ca314f1aa4 refactor: add helper functions for match syntax elaborator 2021-04-06 19:02:03 -07:00