Open Martoon-00 opened 8 years ago
Ok, seems reasonable. Make sure to:
execClientWithConn :: ClientT m a -> StateT Connection m a
to allow IO wrappers.Internal
module, because you're going to export that module now, and we don't want to expose more than necessary. You may need to restructure things a bit, because currently the Internal
module is written with the idea that it won't be exposed in the library. E.g. we still want the Connection
type to be opaque.Internal
module that its API is unstable (in reality, the rest of the API is also unstable until release 1.0, but for internal stuff it makes sense to be more explicit about it).
In our application we may need to keep a routing table (
Map (S.ByteString, Int) Connection
) and so reuse connections. But implementation of it requiresexecClient
to takeConnection
as argument. Is it acceptable to create following functions:execClientWithConn :: Client a -> StateT Connection IO a
initConn :: ByteString -> Int -> IO Connection
closeConn :: Connection -> IO ()
and put them intoNetwork.MessagePack.Client.Internal
?