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: rename Option.toMonad and remove argument #3865

Merged
merged 2 commits into from
Apr 17, 2024
Merged

Conversation

kim-em
Copy link
Collaborator

@kim-em kim-em commented Apr 10, 2024

No description provided.

@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc April 10, 2024 12:44 Inactive
@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 10, 2024
| none => failure
| some a => pure a

@[deprecated toAlternative] def toMonad [Monad m] [Alternative m] : Option α → m α :=
Copy link
Collaborator

@digama0 digama0 Apr 10, 2024

Choose a reason for hiding this comment

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

Does this really need to be deprecated? Besides being a longer name, the name toMonad is also better for people who don't want to have to think about the various monad variants. (I think we could remove the unneeded argument from it though.)

Maybe a better name would be something like getM though, since this is like Option.get but with a monadic effect for failure.

@kim-em kim-em force-pushed the Option.toMonad branch 2 times, most recently from 2e480dc to a9bc091 Compare April 17, 2024 04:42
@kim-em kim-em enabled auto-merge April 17, 2024 04:43
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc April 17, 2024 04:57 Inactive
@kim-em kim-em added this pull request to the merge queue Apr 17, 2024
@leanprover-community-mathlib4-bot
Copy link
Collaborator

Mathlib CI status (docs):

  • ❗ Std/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 75e68e7565708361e117c5f56b66fdbe013de667 --onto 23aacdeac069475e3f40110e87859dad5a22074c. (2024-04-17 05:00:52)

Merged via the queue into master with commit cefba8a Apr 17, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants