lean4-htt/src/Lean/Parser
Sebastian Graf daddac1797
feat: support expected type annotation in doPatDecl (#12866)
This PR adds `optType` support to the `doPatDecl` parser, allowing
`let ⟨width, height⟩ : Nat × Nat ← action` in do-notation. Previously,
only
the less ergonomic `let ⟨width, height⟩ : Nat × Nat := ← action`
workaround
was available. The type annotation is propagated to the monadic action
as an
expected type, matching `doIdDecl`'s existing behavior.

Both the legacy and new (BuiltinDo) elaborators are updated.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 11:42:03 +00:00
..
Module chore: fix core after rebootstrap 2026-02-25 11:40:02 +01:00
Tactic fix: make first token detection work in modules (#12047) 2026-01-20 11:12:05 +00:00
Term chore: fix core after rebootstrap 2026-02-25 11:40:02 +01:00
Attr.lean fix: make first token detection work in modules (#12047) 2026-01-20 11:12:05 +00:00
Basic.lean chore: fix typo in parser docstring (#11753) 2025-12-20 23:17:47 +00:00
Command.lean feat: add deriving noncomputable instance syntax (#12756) 2026-03-03 06:42:41 +00:00
Do.lean feat: support expected type annotation in doPatDecl (#12866) 2026-03-10 11:42:03 +00:00
Extension.lean feat: strengthen evalConst meta check 2026-02-25 11:40:02 +01:00
Extra.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
Level.lean refactor: remove some unnecessary meta imports (#9542) 2025-07-25 15:14:02 +00:00
Module.lean feat: leading whitespace on first token (#12662) 2026-03-06 12:46:44 +00:00
StrInterpolation.lean chore: rename String.Pos to String.Pos.Raw (#10624) 2025-10-01 07:45:24 +00:00
Syntax.lean feat: enable notationItem in "mixfix" notation commands (#10378) 2025-09-14 18:54:36 +00:00
Tactic.lean fix: make first token detection work in modules (#12047) 2026-01-20 11:12:05 +00:00
Term.lean feat: pp.mdata (#12606) 2026-02-24 04:30:26 +00:00
Types.lean chore: turn on new do elaborator in Core (#12656) 2026-03-09 12:38:33 +00:00