Open
Description
Writing an application that connects to several different Nix stores concurrently (with the number variable at runtime) is quite awkward. It would require either:
- Create a monad transformer that can store a runtime-variable list of monads and allow the application to access an element by index
- Put each RemoteStore monad in a different thread and communicate to it over STM.
It seems that monadic sequencing is not strictly necessary to model the remote store functions. It could be accomplished with a withConnection
function, and that would make it much easier to write the application that I described. I'm open to other suggestions. Perhaps there's an alternative I haven't thought of.