Skip to content

Is it possible to relax constraint from Monad to Applicative in Parallel class? #24

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

Closed
paluh opened this issue Mar 5, 2018 · 3 comments · Fixed by #43
Closed

Is it possible to relax constraint from Monad to Applicative in Parallel class? #24

paluh opened this issue Mar 5, 2018 · 3 comments · Fixed by #43
Labels
status: needs more info This issue needs more info before any action can be done.

Comments

@paluh
Copy link

paluh commented Mar 5, 2018

I have an Applicative (which is not a Monad) and I have another Applicative which with additional constraints provides parallel apply for my initial type. It seems that this is the purpose of Parallel class - to define such a relation between types.
If I understand it correctly Parallel requires me to provide Monad instance for my "non parallel type". Why is this the case? Wouldn't it be enough to just require an Applicative instance?

@paluh paluh changed the title Is it possible to relax constraint from Monad to Applicative in Parallel? Is it possible to relax constraint from Monad to Applicative in Parallel class? Mar 5, 2018
@garyb
Copy link
Member

garyb commented Mar 10, 2018

I don't know if there is a good reason not to do this - it seems reasonable, but I guess the idea is if there's a Monad instance then it is required to behave sequentially due to ap = apply.

Any thoughts @paf31, @natefaubion?

@natefaubion
Copy link
Contributor

Considering there are no laws...

@JordanMartinez JordanMartinez added the status: needs more info This issue needs more info before any action can be done. label Dec 4, 2021
@masaeedu
Copy link

masaeedu commented Dec 7, 2022

Would you folks take a PR implementing this? Or would the resulting breakage be too large?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs more info This issue needs more info before any action can be done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants