-
Notifications
You must be signed in to change notification settings - Fork 28
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
Effects and linear types #37
Comments
What do you mean by this? Also, my understanding of
The only thing I'm aware of would be |
Ok, that was not the best phrasing 😄 What I mean is: Can we provide functions with the type signatures that I listed in my comment? I totally agree that
Thank you for the pointer; I was not aware of those. |
@arybczak If you don't mind I suggest to keep this issue open to track this effort which may lead to a new companion library ( |
Sure. But I still don't think it's worth it. In particular:
This means "
This means "the effect handler uses the effect operation exactly once". Well, it has to use it at least once, since otherwise it won't produce the result. What happens if it uses it more than once?
This means " As for |
I've been looking into the linear types that came with GHC 9 lately and I wondered if the following was possible:
If I was sending a dynamically dispatched effect, can we provide a type-level guarantee that this effect is handled exactly once? I.e.
Note that this is trivial for statically dispatched effects.
Besides that it might be interesting if there are other parts in effectful where linear types might be beneficial.
The text was updated successfully, but these errors were encountered: