Joachim Breitner
d9b6794e2f
refactor: termination_by parser to use binderIdent ( #3652 )
...
this way we should be able to use `elabBinders` to parse the binders.
2024-03-11 16:29:56 +00:00
Leonardo de Moura
ecfaf8f3e7
feat: add let_expr notation
2024-03-02 08:16:18 -08:00
Leonardo de Moura
3c0e575fe0
feat: add matchExprPat parser
2024-03-02 08:16:18 -08:00
Leonardo de Moura
70d9106644
feat: match_expr parsers
2024-03-01 22:33:14 -08:00
Scott Morrison
819a32a9eb
chore: upstream show_term
...
add missing prelude
2024-02-29 17:34:15 +11:00
Joachim Breitner
b9c4a7e51d
feat: termination_by? ( #3514 )
...
the user can now write `termination_by?` to see the termination argument
inferred by GuessLex, and turn it into `termination_by …` using the “Try
this” widget or a code action.
To be done later, maybe: Avoid writing `sizeOf` if it's not necessary.
2024-02-28 10:53:17 +00:00
Kyle Miller
a3226d4fe4
fix: make omission syntax be a builtin syntax
...
When editing core Lean, the `pp.proofs` feature causes goal states to fail to display in the Infoview, instead showing only "error when printing message: unknown constant '«term⋯»'". This PR moves the `⋯` syntax from Init.NotationExtra to Lean.Elab.BuiltinTerm
It also makes it so that `⋯` elaborates as `_` while logging a warning, rather than throwing an error, which should be somewhat more friendly when copy/pasting from the Infoview.
Closes #3476
2024-02-28 09:23:17 +01:00
Henrik Böving
23e49eb519
perf: add prelude to all Lean modules
2024-02-18 14:55:17 -08:00
Scott Morrison
98085661c7
chore: upstream haveI tactic
...
chore: `haveI` and `letI` builtin parsers
2024-02-15 14:33:36 +11:00
Leonardo de Moura
a17832ba14
chore: add unsafe term builtin parser
2024-02-09 18:23:46 +11:00
Leonardo de Moura
9c160b8030
feat: nofun tactic and term
...
closes #3279
2024-02-09 15:56:57 +11:00
Leonardo de Moura
709e9909e7
feat: add nofun term parser
...
This new syntax suggested by @semorrison for the `fun.` Std macro.
2024-02-09 15:56:57 +11:00
Leonardo de Moura
1f547225d1
feat: nary nomatch ( #3285 )
...
Base for https://github.com/leanprover/lean4/pull/3279
---------
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
2024-02-09 00:28:34 +00:00
Joachim Breitner
b5122b6a7b
feat: per-function termination hints
...
This change
* moves `termination_by` and `decreasing_by` next to the function they
apply to
* simplify the syntax of `termination_by`
* apply the `decreasing_by` goal to all goals at once, for better
interactive use.
See the section in `RELEASES.md` for more details and migration advise.
This is a hard breaking change, requiring developers to touch every
`termination_by` in their code base. We decided to still do it as a
hard-breaking change, because supporting both old and new syntax at the
same time would be non-trivial, and not save that much. Moreover, this
requires changes to some metaprograms that developers might have
written, and supporting both syntaxes at the same time would make
_their_ migration harder.
2024-01-10 17:27:35 +01:00
Eric Wieser
430f4d28e4
doc: mention x:h@e variant in docstring of x@e ( #3073 )
...
This was done in 1c1e6d79a7
[Zulip
thread](https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Naming.20equality.20hypothesis.20in.20match.20branch/near/408016140 )
2023-12-14 18:58:14 +00:00
Leni Aniva
ab36ed477e
feat: allow trailing comma in tuples, lists, and tactics ( #2643 )
2023-11-17 13:31:41 +01:00
Sebastian Ullrich
8b145b05e2
feat: add leftact%/rightact% syntax
2023-11-12 16:57:51 +11:00
Eric Wieser
72f7144403
doc: mention the proof-binding syntax in match
...
This comes up over and over again in the zulip; let's document it!
2023-11-06 11:28:03 -08:00
Mario Carneiro
2037094f8c
doc: document all parser aliases ( #2499 )
2023-09-06 09:02:25 +00:00
Mario Carneiro
43f6d0a761
feat: implement have this (part 1)
2023-06-02 16:19:02 +02:00
Mario Carneiro
5661b15e35
fix: spacing and indentation fixes
2023-05-28 18:48:36 -07:00
Mario Carneiro
df49512880
fix: use withoutPosition in anon constructor
2023-05-17 09:48:34 +02:00
Sebastian Ullrich
d7a0197fee
chore: improve tacticSeqIndentGt error message
2023-03-15 10:52:57 +01:00
Gabriel Ebner
181fbdfb42
feat: add fun x ↦ y syntax
2023-01-03 13:59:53 -08:00
Gabriel Ebner
e71a2e58bb
fix: remove misleading leading space in " where"
2022-12-21 22:54:42 +01:00
Gabriel Ebner
0d598dcfdf
fix: Format.align always prints whitespace
2022-12-21 22:54:42 +01:00
Sebastian Ullrich
96ccf192e8
fix: parenthesize by optParam values
2022-12-20 18:10:39 +01:00
Sebastian Ullrich
4c11743f4b
refactor: split paren parser, part 2
2022-11-11 13:45:41 +01:00
Sebastian Ullrich
791fc70dd9
refactor: split paren parser
2022-11-11 13:45:41 +01:00
Sebastian Ullrich
d5255e94e8
perf: improve dynamicQuot caching
2022-11-11 09:13:02 +01:00
Sebastian Ullrich
57320712f0
fix: extraneous missing items on parser stack
2022-11-11 09:13:02 +01:00
Adrien Champion
5849fdc6c9
feat: require strict indentation on nested by-s
2022-11-08 08:30:42 -08:00
Mario Carneiro
32b6bd0d8b
feat: empty type ascription syntax (e :) (part 2)
2022-11-07 19:10:56 +01:00
Mario Carneiro
02d8a5d56e
feat: empty type ascription syntax (e :)
2022-11-07 19:10:56 +01:00
Leonardo de Moura
e369c3beb6
fix: disallow . immediately after ..
...
Rejects the following weird example
```
```
which was being parsed as
```
```
2022-10-26 07:13:40 -07:00
Leonardo de Moura
00ca0dde5c
feat: add unop% term parser
...
We not to support unary minus at `BinOp.toTree`
see #1779
2022-10-26 06:19:22 -07:00
Mario Carneiro
765ebcdbf0
feat: use withoutPosition consistently
2022-10-24 12:51:32 -07:00
Mario Carneiro
e7c7678ab0
refactor: line wrapping in parser code
2022-10-24 08:37:29 -07:00
Mario Carneiro
b3ba78aade
feat: hovers & name resolution in registerCombinatorAttribute (part 2)
2022-10-23 09:30:38 +02:00
Mario Carneiro
583e023314
chore: snake-case attributes (part 2)
2022-10-19 09:28:08 -07:00
Mario Carneiro
dd5948d641
chore: snake-case attributes (part 1)
2022-10-19 09:28:08 -07:00
Gabriel Ebner
fb4d90a58b
feat: dynamic quotations for categories
2022-10-18 14:59:14 -07:00
Gabriel Ebner
0d3d05bd3a
feat: clear%
2022-10-11 17:24:35 -07:00
Gabriel Ebner
7356840cbc
feat: use sepBy1Indent for tactic blocks
2022-09-18 16:43:23 -07:00
Sebastian Ullrich
a657a638f0
feat: sub-info tree level hover
2022-08-31 17:49:43 -07:00
Sebastian Ullrich
4050227e5d
chore: revert marking internal notes as parser/elab docstrings
2022-08-31 17:49:43 -07:00
Gabriel Ebner
82e9f09bca
fix: remove incorrect syntax coercion
2022-08-25 17:54:26 +02:00
Mario Carneiro
014db5d6d0
doc: relocate doc strings from elab to syntax
2022-08-13 17:16:40 -07:00
Mario Carneiro
b0db7deeef
doc: documentation for Init.Coe
2022-08-13 17:15:49 -07:00
Mario Carneiro
e816424466
chore: use Category declarations for builtin cats too ( #1400 )
2022-08-03 18:10:54 -07:00