-
Notifications
You must be signed in to change notification settings - Fork 14
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
Get rid of FutContents #108
Comments
One problem with current loopmpm :: Int -> (forall ls . ParST (stt ls) p e s ())
loopmpm = ... When we run this in a I'm wondering if we could remove |
Update: Yesterday at the meeting we discussed this briefly, and had the idea of removing argument type FutContents m :: * -> Constraint I just tried this but it didn't make any difference -- I'm getting exactly the same error message. I don't fully understand how this could allow our programs to type check, as far as I can see only difference is this is less flexible, because now I can't define something like this: type FutContents Par a = (Eq a, Ord a) instead I have to do something like: type FutContents Par = Eq So I have this idea: @rrnewton yesterday you mentioned why we need to use |
Yes, it's annoying not to have type-level lambda, but can't you do something like: type FutContents Par = EqOrd
type EqOrd a = (Eq a, Ord a) Or maybe type aliases aren't allowed in that way? |
@osa1 : Well, whatever you use to implement a |
OK, that makes sense. I'll try to find a workaround then. |
Ömer (@osa1) and I have been discussing this. At one point, we wanted to be able to retain "put" functions without an
Eq
constraint, like the earlier monad-par library. But now I think we should look into giving up on that and requiringEq
everywhere, which lets us get rid ofFutContents
. I don't believe there were any other good use cases forFutContents
. (A better use case for class associated constraints in LVish is probably the Map-like collections, which have various requirements on their keys.)FutContents
seems to be a good example of an over-abstracted API. It pollutes a lot of interfaces with for par computations with implementation details about what is or isn't stored in IVars internally within the algorithm.Speak up if you have anything you must stick in a future or IVar which cannot have an
Eq
instance!The text was updated successfully, but these errors were encountered: