Daniel Selsam
0036111db9
feat: pp.analyze original mvars are not unknown
2021-08-03 09:13:18 +02:00
Daniel Selsam
e6b90dde8f
fix: pp.analyze mvars can bottom-up
2021-08-03 09:13:18 +02:00
Daniel Selsam
c3d62c1076
chore: patch tests for pp.analyze default
2021-08-03 09:13:18 +02:00
Daniel Selsam
ded51882a0
feat: pp motives and misc delab fixes
2021-06-13 00:06:27 +02:00
Leonardo de Moura
002f96adc1
test: discriminant refinement
2021-03-28 19:06:06 -07:00
Sebastian Ullrich
a74960a4ab
fix: delaborator: match with shadowing
2021-02-11 11:30:25 +01:00
Leonardo de Moura
eb25b97501
fix: pattern variables cannot shadow each other
2021-01-16 08:23:45 -08:00
Leonardo de Moura
f73eb1246a
feat: add pp.safe_shadowing
...
When `pp.safe_shadowing` is set to true, we still use the
suggested name if the "body" does not contain a free variable with the
suggested name. This is the approach used in Lean 3, and I think it
improved the result in all affected tests.
The implementation was simple. The only nasty case was `delabAppMatch`.
The main motivation for this feature was hovering information such as
```lean
f : {α_1 : Type} → α_1 → α_1
```
when hovering over the `f` at
```lean
def g (α : Type) (a : α) :=
f a
```
With `safe_shadowing`, we get the nicer
```lean
f : {α : Type} → α → α
```
cc @Kha
2021-01-15 18:53:25 -08:00
Sebastian Ullrich
b2b78eb222
test: use printMessageEndPos for leantests
2021-01-15 16:27:59 +01:00
Sebastian Ullrich
3e77c7cdef
fix: error position
2020-12-21 16:25:01 +01:00
Sebastian Ullrich
4812f2aa64
chore: restore correct position for match errors
2020-12-16 18:27:05 +01:00
Sebastian Ullrich
f9dcbbddc4
refactor: remove optional leading pipe from match, use many1Indent instead of sepBy1
2020-12-16 18:27:05 +01:00
Leonardo de Moura
906cb81319
feat: improve inferAppType
...
See comment at `Expr.instantiateRevRange`
2020-12-06 19:01:23 -08:00
Leonardo de Moura
1e84fa1eed
refactor: more general OfNat, remove One and Zero classes
2020-12-01 07:49:52 -08:00
Leonardo de Moura
390eea3750
feat: use One and Zero classes when expanding numeric literals
2020-11-29 16:23:52 -08:00
Sebastian Ullrich
b22e035b6f
fix: pretty print empty matchers as nomatch
...
/cc @leodemoura
2020-11-25 11:30:24 +01:00
Sebastian Ullrich
9c6c568caf
fix: don't try to pretty-print underapplied matcher
...
Fixes #219
2020-11-14 13:19:21 +01:00
Sebastian Ullrich
e4f53fd92d
chore: adjust list & array spacing
2020-11-10 10:11:24 -08:00
Sebastian Ullrich
ce9be52ffb
feat: pretty print lists and arrays
2020-11-10 10:11:24 -08:00
Sebastian Ullrich
3665e3b7b5
feat: pretty print match
...
Fixes #177
2020-11-10 10:11:24 -08:00
Leonardo de Moura
7e8a7e6660
feat: elaborate fun/forall binder extensions
2020-11-09 19:00:40 -08:00
Leonardo de Moura
defa45ae2f
feat: improve error message
...
when match-expression LHSs still contain metavariables after elaboration
2020-11-09 18:26:14 -08:00
Leonardo de Moura
aeac85dadb
chore: cleanup
2020-10-17 09:09:30 -07:00
Leonardo de Moura
5a24cb5ef7
feat: add hygienicIntro option
...
@Kha `hygienicIntro` is true by default. `hygienicIntro == false` is
the Lean3 behavior. If we find `hygienicIntro` too inconvenient in
practice, we set the default to false.
2020-09-18 13:02:38 -07:00
Sebastian Ullrich
3834a89cdc
feat: activate new pretty printer
2020-09-17 08:12:28 -07:00
Leonardo de Moura
b136c519e2
fix: scope and improve error message
2020-09-09 16:44:43 -07:00
Leonardo de Moura
c78d0cf1f8
feat: use | position for reporting dependent-match elimination errors
2020-09-09 14:07:23 -07:00
Leonardo de Moura
854cc3418e
feat: improve error message for dependent-match elimination failures
...
@Kha This is a first attempt to improve the error message for examples
like the one Andrew Kent posted on Zulip.
I created a simpler example using "vectors".
2020-09-09 13:43:06 -07:00
Leonardo de Moura
69ee44d68e
feat: match-expressions showing signs of life
2020-08-13 16:51:31 -07:00