Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make List.all and List.any short-circuit #2972

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

semorrison
Copy link
Collaborator

Changes the implementation of List.all and List.any so they short-circuit. The implementations are tail-recursive.

This replaces leanprover-community/batteries#392, which was going to do this with @[csimp].

@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 Nov 28, 2023
@leanprover-community-mathlib4-bot
Copy link
Collaborator

  • ❗ Mathlib CI will not be attempted unless you rebase your PR onto the 'nightly' branch. (2023-11-28 04:08:04)
  • ✅ Mathlib branch lean-pr-testing-2972 has successfully built against this PR. (2023-11-28 07:23:08) View Log
  • ✅ Mathlib branch lean-pr-testing-2972 has successfully built against this PR. (2023-12-12 01:07:33) View Log

Copy link
Contributor

@nomeata nomeata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, the footguns for those coming from Haskell :-)

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Nov 28, 2023
@leodemoura leodemoura removed the awaiting-review Waiting for someone to review the PR label Dec 1, 2023
@tydeu
Copy link
Member

tydeu commented Dec 5, 2023

@semorrison You need to force push this branch (e.g., with an empty rebase) to retrigger CI and get it to pass the new required checks.

@[inline] doesn't do anything now?
@leodemoura leodemoura added this pull request to the merge queue Dec 11, 2023
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 11, 2023
@semorrison semorrison added the will-merge-soon …unless someone speaks up label Dec 11, 2023
Merged via the queue into leanprover:master with commit c656e71 Dec 12, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds-mathlib CI has verified that Mathlib builds against this PR toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN will-merge-soon …unless someone speaks up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants