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
Sebastian Ullrich
4d2efd4d08
fix: HasOrelse (DelabM _)
2020-09-17 08:12:28 -07:00
Leonardo de Moura
17d11b9566
chore: update stage0
2020-09-16 17:46:25 -07:00
Leonardo de Moura
a2e8a41f33
feat: rewrite tactic parser
2020-09-16 17:43:44 -07:00
Leonardo de Moura
c620a2a59d
feat: refine parser location
2020-09-16 17:28:09 -07:00
Leonardo de Moura
b37158f4f8
fix: apply
2020-09-16 16:18:30 -07:00
Leonardo de Moura
9f5e63cd3c
feat: add option pp.macroStack
...
@Kha I set it to `false` by default.
2020-09-16 15:29:28 -07:00
Leonardo de Moura
965a989dc2
fix: must log at evalCommand
...
Some macros expand a command into multiple commands. We should not
interrupt the elaboration of the command sequence when one fails.
2020-09-16 14:55:58 -07:00
Leonardo de Moura
a6715aff5b
chore: update stage0
2020-09-16 14:18:48 -07:00
Leonardo de Moura
0421f37eee
fix: lean4 support for exports in the old frontend
2020-09-16 14:16:03 -07:00
Leonardo de Moura
751db760d5
fix: sanitizeNames
...
A macro scoped name cannot shadow a name without macro scopes.
2020-09-16 13:54:30 -07:00
Leonardo de Moura
e10cd085f4
feat: use sanitizeNames at ppGoal
2020-09-16 13:39:06 -07:00
Leonardo de Moura
16ec9db1fc
chore: fix test
2020-09-16 13:12:00 -07:00
Leonardo de Moura
0e3a296fba
feat: use is_inaccessible_user_name in old pretty printer
2020-09-16 13:10:42 -07:00
Leonardo de Moura
a9f15f9a5b
chore: update stage0
2020-09-16 12:01:14 -07:00
Leonardo de Moura
18a7f5a489
feat: new name sanitizer
2020-09-16 11:57:55 -07:00
Leonardo de Moura
e88e398642
fix: multiple occurrences of named holes
...
@Kha I added a new test with the scenarios we discussed this morning.
2020-09-16 10:27:30 -07:00
Leonardo de Moura
f2835207a8
refactor: move isDefEqGuarded helper
2020-09-16 10:15:47 -07:00
Leonardo de Moura
4ebf1356d7
feat: add MetavarContext.findUserName?
2020-09-16 10:14:59 -07:00
Leonardo de Moura
d00dc1988a
fix: isWellFormed
2020-09-16 10:14:47 -07:00
Leonardo de Moura
d81f1c585b
fix: incorrect default configuration
2020-09-16 08:26:41 -07:00
Leonardo de Moura
544d2f4ce5
fix: kind for type metavariable
...
For example, `mkFreshExprMVar none MetavarKind.synthetic` should
create a fresh synthetic metavariable `?m` with type `?t` where `?t`
is a fresh natural metavariable. If users want a synthetic
metavariable `?t`, then it must create it themselves.
2020-09-16 08:24:15 -07:00
Leonardo de Moura
b52ce76222
feat: display uncaught internal exceptions
2020-09-16 08:23:12 -07:00
Leonardo de Moura
0abca5475f
refactor: move ppExpr to IO
...
@Kha I am also tracking `currNamespace` and `openDecls`.
BTW, I also tried an experiment where I added `currNamespace` and
`openDecls` to `Meta.Context`, but it looked weird. This information
is only needed in the elaborator and pretty printer.
The `PPContext` object should contain everything you need. You
can put `currNamespace` and `openDecls` in the `Delaborator.Context`.
2020-09-15 18:48:21 -07:00
Leonardo de Moura
c8a4252461
refactor: move OpenDecl to Data
2020-09-15 16:53:53 -07:00
Leonardo de Moura
1ce80d5ba7
feat: hide auxiliary declarations
2020-09-15 16:50:16 -07:00
Leonardo de Moura
c4c1a3fc8d
chore: make it clear the free variable dependency
2020-09-15 16:39:17 -07:00
Leonardo de Moura
19a7927f10
feat: sanitizeNames
...
@Kha I am using `_shadowed.<idx>` suffix for marking variables that
have been shadowed. It is a bit verbose, but at least it is easy to
understand understand error messages such as
```
shadow.lean:4:0: error: type mismatch
h
has type
x._shadowed.1 = x._shadowed.1
but it is expected to have type
x = x
```
It is better than the old cryptic version
```
shadow.lean:4:0: error: type mismatch
h
has type
x = x
but it is expected to have type
x = x
```
2020-09-15 16:28:50 -07:00
Leonardo de Moura
9af6264aad
fix: do not fail if target is not found
2020-09-15 15:06:35 -07:00
Leonardo de Moura
4e99b19a96
fix: expandMatchDiscr cannot be a macro
...
The `matchType` created by the macro is bad for dependent pattern
matching. The `tst8` and `tst9` at `matchTac` failed to be elaborated
when using the macro.
2020-09-15 13:29:28 -07:00
Leonardo de Moura
75814c2d21
chore: fix tests
2020-09-15 11:11:05 -07:00
Leonardo de Moura
e7f2d7af0b
chore: remove default main name
2020-09-15 10:46:40 -07:00
Leonardo de Moura
232378070f
feat: parentTag propagation for apply
2020-09-15 10:46:40 -07:00
Leonardo de Moura
177c00a895
feat: case tactic should reset tag
2020-09-15 10:46:40 -07:00
Leonardo de Moura
52d6fbb906
fix: appendTagSuffix operation
2020-09-15 10:46:40 -07:00