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

Instance for Eff? #7

Open
natefaubion opened this issue Aug 19, 2016 · 7 comments
Open

Instance for Eff? #7

natefaubion opened this issue Aug 19, 2016 · 7 comments
Labels
type: enhancement A new feature or addition.

Comments

@natefaubion
Copy link
Contributor

Is there a reason for there to not be an instance for Eff proper? I know in JS its "technically" not parallel. But if Eff was implemented on a true multi-threaded platform like the JVM, it definitely would be possible. Also I'd argue that a MonadPar instance for Eff is no different than MonadPar for Aff where you liftEff everything.

@paf31
Copy link
Contributor

paf31 commented Aug 19, 2016

I think it's a reasonable law that par f x y be observationally identical to par (flip f) y x and that seems false for Eff.

@natefaubion
Copy link
Contributor Author

That law does not necessarily hold for Aff.

@natefaubion
Copy link
Contributor Author

In fact it doesn't hold for anything that supports synchronicity on platforms without multithreading.

@paf31
Copy link
Contributor

paf31 commented Aug 19, 2016

Is the suggested instance par = liftA2?

@natefaubion
Copy link
Contributor Author

The suggested instance is implemented via the FFI, such that a platform that has true multithreading could have a better implementation.

@natefaubion
Copy link
Contributor Author

But yes, for the JS platform, that's what it would be.

@JordanMartinez JordanMartinez added the type: enhancement A new feature or addition. label Dec 4, 2021
@JordanMartinez
Copy link
Contributor

I'm guessing this issue applies to Effect now rather than Eff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A new feature or addition.
Projects
None yet
Development

No branches or pull requests

3 participants