Leonardo de Moura
a489bdb107
doc: some doc strings
2022-07-30 21:18:50 -07:00
Leonardo de Moura
dadab54014
chore: remove unused param
2022-07-29 20:41:38 -07:00
Leonardo de Moura
b3b2a07ed0
feat: support dotted notation and named arguments in patterns
2022-07-25 18:19:32 -07:00
Mario Carneiro
f6211b1a74
chore: convert doc/mod comments from /- to /--//-! ( #1354 )
2022-07-22 12:05:31 -07:00
Gabriel Ebner
a8cab84735
refactor: use computed fields for Expr
2022-07-11 14:19:41 -07:00
Gabriel Ebner
23113501f4
chore: prepare for Name refactoring
2022-07-11 14:19:41 -07:00
Leonardo de Moura
c9771fa1b2
chore: unused variables
2022-07-07 20:24:18 -07:00
Leonardo de Moura
2ebcf29cde
chore: use a[i]! for array accesses that may panic
2022-07-02 15:12:05 -07:00
Sebastian Ullrich
22475b8669
refactor: introduce common TSyntax abbreviations
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
5e334b3e90
chore: postpone TSyntax adoption for some parts
...
The namespace `TSyntax.Compat` can be opened for a coercion
`Syntax -> TSyntax k` for any `k`, as otherwise this PR would never be done.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
a78302243c
refactor: strengthen Syntax signatures
...
Most notable change: `Quote` is now parameterized by the target kind.
Which means that `Name` etc. could actually have different
implementations for quoting into `term` and `level`, if that need ever
arises.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
ce054fb2e7
fix: introduce semicolonOrLinebreak, replace many(1) with sepBy(1) where appropriate
2022-06-16 23:33:57 +02:00
Leonardo de Moura
77ae79be46
chore: use let/if in do blocks
2022-06-13 17:10:14 -07:00
Leonardo de Moura
bef1cd4872
fix: make structure instance notation (e.g., { a, b }) works in patterns after we define the Set notation in Mathlib
2022-05-25 19:14:22 -07:00
Sebastian Ullrich
a2bf2a4abd
fix: info at pattern variables
2022-05-17 06:28:59 -07:00
Sebastian Ullrich
22f8ea147c
fix: propagate position information of variables in do blocks
2022-05-07 15:50:26 -07:00
Leonardo de Moura
fdd1cb5751
chore: remove workarounds for #1090
2022-04-01 11:28:17 -07:00
Leonardo de Moura
68acfc7fb9
chore: prepare for #1090
2022-04-01 11:11:28 -07:00
Leonardo de Moura
09de67780f
chore: prepare for #1090
2022-04-01 09:35:06 -07:00
Leonardo de Moura
e1fa9c131c
feat: inferring namespace from expected type a la Swift
...
Now that `PatternVars.lean` has been redesigned, it is feasible to
implement issue #944 .
closes #944
2022-03-10 16:55:25 -08:00
Leonardo de Moura
3214a20d33
feat: allow overloaded notation in patterns
2022-03-10 12:51:34 -08:00
Leonardo de Moura
92318d07bb
feat: add MonadBacktrack instance for CollectPatternVars.M monad
2022-03-10 10:23:18 -08:00
Leonardo de Moura
1609f96128
refactor: simplify PatternVar.lean and Match.lean
2022-03-09 14:01:40 -08:00
Leonardo de Moura
56cdacfc28
feat: allow synthetic holes to be used as patterns
...
They are useful for getting meaningful pattern variable names when the hole
is not an inaccessible pattern. See new test.
We are going to use this feature to address issue 2 at #1018 .
2022-02-15 15:34:14 -08:00
Leonardo de Moura
36d7f2a1ea
chore: remove dead code
2022-01-26 10:38:46 -08:00
Leonardo de Moura
1c1e6d79a7
feat: add equality proof for named patterns
...
The user can optionally name the equality proof.
The new test demostrates how to name the equality proof.
closes #501
2022-01-18 12:43:01 -08:00
Leonardo de Moura
6631f1d5b3
chore: use namedPatternOld
2022-01-17 17:18:03 -08:00
Leonardo de Moura
2c690926cf
feat: update namedPattern parser
2022-01-17 16:49:20 -08:00
Gabriel Ebner
bfc74decde
feat: add info field to Syntax.node
2021-10-26 20:19:27 +02:00
Leonardo de Moura
445cc3085f
refactor: avoid Name, MVarId, and FVarId confusion
2021-09-07 19:06:50 -07:00
Leonardo de Moura
d1d7ce1839
feat: start support for strict implicit binder annotation
2021-08-03 18:42:15 -07:00
Sebastian Ullrich
32bea73708
fix: ensure hygiene of double-quoted names
...
Fixes #586
2021-07-30 07:17:50 -07:00
Sebastian Ullrich
2833c61a60
fix: respect preresolved names at resolveConst*
...
This makes sure we can properly quote e.g. `deriving` clauses and avoids
a suspicious `eraseMacroScopes` call (though not at `Elab.Syntax`, since
categories do not have to be declaration names)
2021-07-30 07:17:50 -07:00
Leonardo de Moura
7e1bb3e65b
refactor: add MatchAltView.lean and PatternVar.lean
2021-06-28 08:29:47 -07:00