Skip to content

Alternative instances no longer require MonadPlus#106

Open
GregoryTravis wants to merge 10 commits intohaskell:mainfrom
GregoryTravis:alternative
Open

Alternative instances no longer require MonadPlus#106
GregoryTravis wants to merge 10 commits intohaskell:mainfrom
GregoryTravis:alternative

Conversation

@GregoryTravis
Copy link
Copy Markdown

@GregoryTravis GregoryTravis commented Feb 7, 2026

Fixes #83 by requiring Alternative rather than MonadPlus in the Alternative instances for:

  • Accum
  • RWS/CPS
  • RWS/Lazy
  • RWS/Strict
  • Select
  • State/Lazy
  • State/Strict
  • Writer/CPS

Comment thread Control/Monad/Trans/RWS/CPS.hs Outdated
@GregoryTravis GregoryTravis requested a review from sjshuck February 7, 2026 20:52
@L0neGamer
Copy link
Copy Markdown
Collaborator

Could I ask for this to be rebased and then we can re-review?

@GregoryTravis
Copy link
Copy Markdown
Author

@L0neGamer ready for re-review.

@L0neGamer
Copy link
Copy Markdown
Collaborator

Looks like the CI caught some redundant constraints on some versions of ghc! Sorry for the slow feedback loop.

@GregoryTravis
Copy link
Copy Markdown
Author

MHs seems to require a Traversible import that ghc 9.14.1 doesn't want. Trying an ifdef.

@L0neGamer
Copy link
Copy Markdown
Collaborator

Darn, yeah that's an issue we have. Sorry, would you be able to leave it in without the cpp? We can live with some warnings until #117 is merged when MHS updates.

@L0neGamer
Copy link
Copy Markdown
Collaborator

Just needs to undo the removal of imports in Lift and I think we're good to go!

Copy link
Copy Markdown
Collaborator

@L0neGamer L0neGamer left a comment

Choose a reason for hiding this comment

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

Again, sorry for the back and forth. further review which should be the last thing:

restore Writer.Lazy's imports
restore Except's imports
restore Identity's imports
restore Maybe's imports
restore Reverse's imports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Why Alternative instances require MonadPlus?

3 participants