purescript/purescript-parallel

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

paluh opened this issue · 3 comments

paluh commented

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?

garyb commented

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?

Considering there are no laws...

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