-
Notifications
You must be signed in to change notification settings - Fork 23
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
WIP: Lift the monad stack to a monad stack transformer #72
base: master
Are you sure you want to change the base?
Conversation
@@ -210,7 +214,7 @@ buildDerivation p drv buildMode = do | |||
-- XXX: reason for this is unknown | |||
-- but without it protocol just hangs waiting for | |||
-- more data. Needs investigation | |||
putInt 0 | |||
putInt (0 :: Int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was keeping this one pop up in warnings intentionally as it's not clear why we need that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, good catch. this is completely unrelated.
This refactors the store to make it composable with arbitrary mtl monad stacks, with the added constraint that `addToStore` takes a filtering fucntion `FilePath -> PathFilter -> m Bool` which is not MonadBaseControl compatible, and cannot be lifted (the monad is in a negative/contravariant position). The solution involves a RemoteStoreT transformer, a MonadRemoteStore monad and still lacks a proper generic MonadStore which I would like to make generic across all the store implementations (in-memeory / read-only / remote daemon / etc.)
Co-Authored-By: Guillaume Maudoux <[email protected]> Co-Authored-By: John Ericson <[email protected]> Related to #72
Co-Authored-By: Guillaume Maudoux <[email protected]> - `RemoteStoreT`, `RemoteStoreState` from #72 Co-Authored-By: John Ericson <[email protected]> - Reorg, `MonadRemoteStore0`, `MonadRemoteStoreHandshake`, `PreStoreConfig`, better `greet` Co-Authored-By: Ryan Trinkle <[email protected]> - Correctly detect when other side has hung up, throws `RemoteStoreError_Disconnected`
Co-Authored-By: Guillaume Maudoux <[email protected]> Related to #72
- By layus - `RemoteStoreT`, `RemoteStoreState` from #72 - By Ericson2314 - Reorg, `MonadRemoteStore0`, `MonadRemoteStoreHandshake`, `PreStoreConfig`, better `greet` - By ryantrinkle - Correctly detect when other side has hung up, throws `RemoteStoreError_Disconnected` Co-Authored-By: Guillaume Maudoux <[email protected]> Co-Authored-By: John Ericson <[email protected]> Co-Authored-By: Ryan Trinkle <[email protected]>
Related to #72 Co-Authored-By: Guillaume Maudoux <[email protected]>
- By layus - `RemoteStoreT`, `RemoteStoreState` from #72 - By Ericson2314 - Reorg, `MonadRemoteStore0`, `MonadRemoteStoreHandshake`, `PreStoreConfig`, better `greet` - By ryantrinkle - Correctly detect when other side has hung up, throws `RemoteStoreError_Disconnected` Co-Authored-By: Guillaume Maudoux <[email protected]> Co-Authored-By: John Ericson <[email protected]> Co-Authored-By: Ryan Trinkle <[email protected]>
Related to #72 Co-Authored-By: Guillaume Maudoux <[email protected]>
It is lifted now! And tagless! The thing that remains is the path filter - #271 Thanks for this, it was quite useful! |
Based on top of #64. Totally unrelated, but progress is on the way :-)
Generalize types to an arbitrary monad stack for better integration into hnix.
This requires a pass across all the code. For now only the portions used by hnix have been converted.