-
Notifications
You must be signed in to change notification settings - Fork 0
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
IO with integrated constraint #5
Comments
This would mean that We would need something along the lines of If we have a bind like that, then we need to be careful about how the constraint resolution works out for the bound functions. To be concrete, say we have some classes
and some and some function
so the constraint solver ought to work out that This means that the desugaring would be quite simple in that functions always consume all linear constraints, and possibly pass some of them on to the next computation. |
(sorry about the delayed response)
Yes. The way I think of it is that
Well, if you want to do it in a point-free notation, it may well be. But if you write do
x <- foo
f x Then, my intention is that the |
As I was typing the file handle example, I realised that it may be a bit annoying to design a do-notation desugaring which would both handle
IO (a .<= c)
andIO a
. Maybe we should just bake in the constraint inIO
directly.Something like:
(plus some complication so that
a
can be either linear or unrestricted)We can always use
IO () a
for the standard case.The text was updated successfully, but these errors were encountered: