Skip to content

feat: make new do elaborator the default#13305

Draft
sgraf812 wants to merge 4 commits intomasterfrom
sg/new-do-rollout
Draft

feat: make new do elaborator the default#13305
sgraf812 wants to merge 4 commits intomasterfrom
sg/new-do-rollout

Conversation

@sgraf812
Copy link
Copy Markdown
Contributor

@sgraf812 sgraf812 commented Apr 7, 2026

This PR makes the new do elaborator the default, rolling it out into Mathlib and the rest of the ecosystem.

@sgraf812 sgraf812 added changelog-language Language features and metaprograms unlock-upstream-stdlib-flags awaiting-mathlib We should not merge this until we have a successful Mathlib build labels Apr 7, 2026
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Apr 7, 2026
@leanprover-bot
Copy link
Copy Markdown
Collaborator

leanprover-bot commented Apr 7, 2026

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-04-07 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2026-04-07 17:09:53)
  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase 35b4c7dbfc2d6df9439813502941d65ffc6e75d1 --onto 861bc19e0c1c45b5766cc5c9ef0488568368b236. You can force reference manual CI using the force-manual-ci label. (2026-04-08 17:57:35)

mathlib-nightly-testing bot pushed a commit to leanprover-community/batteries that referenced this pull request Apr 7, 2026
@github-actions github-actions bot added the mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN label Apr 7, 2026
mathlib-nightly-testing bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Apr 7, 2026
@mathlib-lean-pr-testing mathlib-lean-pr-testing bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Apr 7, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

mathlib-lean-pr-testing bot commented Apr 7, 2026

  • 💥 Mathlib branch lean-pr-testing-13305 build failed against this PR. (2026-04-07 17:13:05) View Log
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 35b4c7dbfc2d6df9439813502941d65ffc6e75d1 --onto 4f6bcc5adac8d6234a9e3def3675402cb89823c6. You can force Mathlib CI using the force-mathlib-ci label. (2026-04-08 17:57:33)

@sgraf812 sgraf812 force-pushed the sg/new-do-rollout branch from 5a7028d to 3c523fd Compare April 8, 2026 16:17
sgraf812 and others added 4 commits April 9, 2026 06:25
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The pure continuation in `ControlLifter.lift` now uses a fresh result type
`?α` instead of `l.origCont.resultType`, mirroring the legacy elaborator's
`DoResultPR` pattern. This allows monad resolution to succeed independently
of the expected result type. For example, `evalConstCheck Nat ``Nat name`
in a `CoreM (Option Nat)` try/catch context: with `Option Nat` as expected
type, Lean cannot decompose `?m Nat =?= CoreM (Option Nat)`, leaving `?m`
stuck. With a fresh `?α`, Lean decomposes `?m Nat =?= CoreM ?α`
successfully. The coercion from `?α` to the original result type is
inserted by `mkPure` via `ensureHasType`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sgraf812 sgraf812 force-pushed the sg/new-do-rollout branch from 3c523fd to 951cc37 Compare April 9, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-mathlib We should not merge this until we have a successful Mathlib build breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan changelog-language Language features and metaprograms mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN unlock-upstream-stdlib-flags

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants