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

MonadAsk is over constrained #144

Open
natefaubion opened this issue May 17, 2022 · 2 comments
Open

MonadAsk is over constrained #144

natefaubion opened this issue May 17, 2022 · 2 comments
Labels
type: breaking change A change that requires a major version bump.

Comments

@natefaubion
Copy link
Contributor

The law for MonadAsk ask >>= \_ -> ask = ask only requires Applicative ask *> ask = ask. You can't execute effects depending on the environment, but you can compute results depending on the environment.

example = f <$> ask <*> other
@JordanMartinez
Copy link
Contributor

Would the class be renamed to ApplicativeAsk?

@natefaubion
Copy link
Contributor Author

I think it would be ApplyAsk. Technically, only Apply is needed for the law.

@JordanMartinez JordanMartinez added the type: breaking change A change that requires a major version bump. label Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: breaking change A change that requires a major version bump.
Projects
None yet
Development

No branches or pull requests

2 participants