Leonardo de Moura
7b6d06df0d
fix: remove bad instances
...
They are unnecessary, and were producing a very big search space in a
few examples.
2020-09-17 17:31:09 -07:00
Leonardo de Moura
c2b35a89f5
chore: increase fuel to make sure test works
2020-09-17 17:30:29 -07:00
Leonardo de Moura
9c8f57f322
fix: preserve info messages from candidates that failed to be elaborated
...
@Kha Not sure whether we should have an option for supressing this
information or not.
We need this information for diagnosing problems. For example, I was trying to
understand why the elaborator was looping. I suspected it was the
TC module, but I was not getting any trace messages since the symbol
was overloaded, and the case that did not work was the expensive one :(
2020-09-17 17:08:14 -07:00
Leonardo de Moura
59bf4defc6
fix: default value
2020-09-17 15:58:29 -07:00
Leonardo de Moura
3dbe2076b9
refactor: Target&LocalDecl => Replace
2020-09-17 13:59:22 -07:00
Leonardo de Moura
4ea8db2722
chore: cleanup
2020-09-17 13:50:40 -07:00
Leonardo de Moura
8142548237
fix: missing toggleInsideQuot
...
cc @Kha
2020-09-17 13:23:52 -07:00
Leonardo de Moura
d1c3ab3797
feat: many1Unbox and nodeSepBy1Unbox parser combinators
...
@Kha I removed the dummy parenthesizer/formatter for `withResultOf`,
and add proper ones for `many1Unbox` and `nodeSepBy1Unbox`.
2020-09-17 13:17:46 -07:00
Leonardo de Moura
3a6d579bbb
feat: expand rewriteSeq macro
2020-09-17 12:32:22 -07:00
Leonardo de Moura
cf85080e7a
feat: proper support for nullKind at evalTactic
...
@Kha When we write command macros, we can easily expand a command
into multiple ones by using `mkNullNode [cmd_1, ... cmd_n]`. Before
this commit, a tactic macro that expands into a sequence of tactics
had to produce `mkNullNode [tac_1, "; ", ..., "; ", tac_n]`.
I forgot the ";" a few times, and it produces very counterintuitive
behavior. This commit is the last step for fixing this issue.
The previous commits add the `withResultOf p f` combinator that allows
us to implement variants of the `unboxSingleton` trick. Now,
```
`(tactic| t)
```
Produces just `t` as before, but
```
`(tactic| t_1; t_2)
```
produces
```
Syntax.node `Tactic.seq [[t_1, "; ", t_2]]
```
instead of
```
Syntax.node `null [t_1, "; ", t_2]
```
2020-09-17 12:20:57 -07:00
Leonardo de Moura
605057b62c
chore: update stage0
2020-09-17 12:15:13 -07:00
Leonardo de Moura
4414aefd14
chore: update stage0
2020-09-17 12:14:39 -07:00
Leonardo de Moura
2dafdec000
feat: use withResultOf combinator instead of unboxSingleton parameter
2020-09-17 12:12:12 -07:00
Leonardo de Moura
0a6a1396f8
chore: update stage0
2020-09-17 12:06:04 -07:00
Leonardo de Moura
4265348bed
feat: add withResultOf parser combinator and unboxSingleton
2020-09-17 12:03:16 -07:00
Leonardo de Moura
56f8103e66
chore: improve error message for rw []
2020-09-17 10:55:51 -07:00
Leonardo de Moura
e9d65dd2de
chore: improve sanitizeNames superscripts
...
cc @Kha
2020-09-17 08:57:54 -07:00
Leonardo de Moura
71f91cca23
chore: make sure isClass? return none when argument contains type errors
...
This is particularly useful for the delaborator when trying to pretty
print code that contains type errors.
2020-09-17 08:24:06 -07:00
Leonardo de Moura
57bed74871
chore: add Rewrite.lean
2020-09-17 08:15:58 -07:00
Leonardo de Moura
f4aabaecae
refactor: move Lean.quote to LeanInit
...
cc @Kha
2020-09-17 08:15:58 -07:00
Leonardo de Moura
9d1f2b644f
chore: rwRuleSeq ; => ,
2020-09-17 08:15:58 -07:00
Sebastian Ullrich
26ed304071
fix: pretty print simplified macro scopes
2020-09-17 17:13:50 +02:00
Sebastian Ullrich
3834a89cdc
feat: activate new pretty printer
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
98453c468b
feat: formatter: don't escape inaccessible names
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
9b6370bdbe
feat: formatter: escaping compound identifiers
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
0b9e46eee5
chore: universe-+ spacing
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
fad4660135
feat: pretty print space between binders
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
986bb17e34
test: remove broken test case
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
131f30f7a9
feat: pretty print tuples
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
27d936ffa5
feat: pretty print structure instances
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
532ea76a0a
fix: elaborator: do not panic on structure instance without expected type
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
be85024724
fix: erase macro scopes on structure instance field names
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
310fc986c1
chore: MetaHasEval TermElabM: print messages
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
f4e6635f2b
chore: getMessageStringEx: show exception
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
6a91fb1613
fix: delaborating projections
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
c4761974b7
fix: runParserCategory: ensure EOI
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
02a6b4d126
chore: remove obsolete code
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
f09a83d38a
fix: delaborating projections
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
bacc77efa1
feat: delaborate builtin operators
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
fd423bada7
fix: pretty print loose bound variables
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
753b598232
fix: delaborator: ignore mdata by default
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
c4812f6e7a
feat: pretty print let
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
4f5b59ad02
feat: pretty print shortened names (export/open/namespace/private)
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
aae1f52580
fix: pretty print unknown fvars
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
01ac1b1fda
fix: prevent infinite recursion on pretty printer failure
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
b54fe2e17a
feat: hide optParams and autoParams by default
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
78d3ea4ce3
feat: hide private names by default
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
ab046db6ed
feat: prettify mvars somewhat
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
650e836ab3
fix: pp internal names
2020-09-17 08:12:28 -07:00
Sebastian Ullrich
607227dc7f
feat: delaborator: tolerate ill-typed terms (such as IR)
2020-09-17 08:12:28 -07:00