-
Notifications
You must be signed in to change notification settings - Fork 140
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
figure out allowing mutable vectors to handle monad stacks #65
Comments
I regularly do this by using |
huh, i'll have to stare at it, but I think that MonadST class is just general enough for this use case, while still allowing much of the current PrimMonad use cases to remain recoverable |
Actually, I misunderstood your first comment and didn't realize monad-st was a package providing the MonadST typeclass (thought you were referring to Control.Monad.ST). I quite like that approach. Just to flesh out the design space a bit, another similar package is monad-primitive. I'm interested in seeing this move forward, but also concerned about breaking backwards compatibility. I have a feeling that there are ways of doing this that greatly minimize breakage, but I need to think about it a bit more. |
Have a look at: I realize that the only problematic aspect of The breakage introduced here is:
While I think the |
i'll have to digest these ideas, but its worth noting that anything that is generic over |
theres enough breaking changes landing in 0.11 and subsequently to improve the library, that I dont think theres a clear argument that we can/should make breaking changes to primitive! Additionally, the PrimMonad api as it currently exists can be used to write our Mutable vector apis have been crippled for years, i'm not sure that your proposed change is as the right point to do the breaking change. (namely, it pushes the breakage to primMonad users rather than Mutable Vector Users). Granted, thats a lot more visible breakage, and I totally agree with that |
I think the a Control.Primitive.Unsafe could import the internals of the ST monad and define
|
I don't believe that's true, can you show what that looks like? I don't know how you would write something that allows you to convert a ReadterT IO into an IO. I'm not sure which other breaking changes are planned, but I'm typically very hesitant about just heaping on extra breakage because we're already breaking other things. |
oh, i was thinking a bit tooo impredicatively, that I could essentially do anyways, @dolio has sold me on the upgrading |
I thought that might have been what you were thinking of, which comes out Anyway, how should we proceed? I can certainly send a pull request with the On Thu, Jan 1, 2015, 8:38 PM Carter Tazio Schonwald <
|
a) yup! (which is kinda a subtle thing to grasp i think) b) thats probably a good way to role, though its ultimately @dolio 's call. but seems like a concrete starting point for making stuff happen. I suspect we'll have to bikeshed over the |
@snoyberg to clarify: if we can cut a new major bump on primmonad for this in the next few days, i'm all for it |
OK, I opened a pull request on this. On Thu, Jan 1, 2015, 11:43 PM Carter Tazio Schonwald <
|
Split off PrimMonadInternal haskell/vector#65
If I'm not mistaken, this was addressed when we split |
possibly by eg a breaking change to the api for 0.11 (or more likely 0.12) that either
a) uses Monad-ST or
b) rethinks PrmMonad and the primitive package
I think this should be on the table for 0.12, though its something that should be contemplated for 0.11
The text was updated successfully, but these errors were encountered: