WIP: Lift the monad stack to a monad stack transformer#72
Draft
layus wants to merge 7 commits intohaskell-nix:masterfrom
Draft
WIP: Lift the monad stack to a monad stack transformer#72layus wants to merge 7 commits intohaskell-nix:masterfrom
layus wants to merge 7 commits intohaskell-nix:masterfrom
Conversation
sorki
reviewed
Nov 9, 2020
| -- but without it protocol just hangs waiting for | ||
| -- more data. Needs investigation | ||
| putInt 0 | ||
| putInt (0 :: Int) |
Member
There was a problem hiding this comment.
I was keeping this one pop up in warnings intentionally as it's not clear why we need that.
Contributor
Author
There was a problem hiding this comment.
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.)
sorki
added a commit
that referenced
this pull request
Nov 30, 2023
Co-Authored-By: Guillaume Maudoux <layus.on@gmail.com> Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems> Related to #72
sorki
added a commit
that referenced
this pull request
Dec 1, 2023
Co-Authored-By: Guillaume Maudoux <layus.on@gmail.com> - `RemoteStoreT`, `RemoteStoreState` from #72 Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems> - Reorg, `MonadRemoteStore0`, `MonadRemoteStoreHandshake`, `PreStoreConfig`, better `greet` Co-Authored-By: Ryan Trinkle <ryan@trinkle.org> - Correctly detect when other side has hung up, throws `RemoteStoreError_Disconnected`
sorki
added a commit
that referenced
this pull request
Dec 3, 2023
Co-Authored-By: Guillaume Maudoux <layus.on@gmail.com> Related to #72
sorki
added a commit
that referenced
this pull request
Dec 3, 2023
- 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 <layus.on@gmail.com> Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems> Co-Authored-By: Ryan Trinkle <ryan@trinkle.org>
sorki
added a commit
that referenced
this pull request
Dec 3, 2023
Related to #72 Co-Authored-By: Guillaume Maudoux <layus.on@gmail.com>
sorki
added a commit
that referenced
this pull request
Dec 6, 2023
- 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 <layus.on@gmail.com> Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems> Co-Authored-By: Ryan Trinkle <ryan@trinkle.org>
sorki
added a commit
that referenced
this pull request
Dec 6, 2023
Related to #72 Co-Authored-By: Guillaume Maudoux <layus.on@gmail.com>
Member
|
It is lifted now! And tagless! The thing that remains is the path filter - #271 Thanks for this, it was quite useful! |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.