network-conduit

How can I get a value after running a conduit?

一笑奈何 提交于 2020-01-06 02:21:10
问题 I need to do a little back and forth between with client and get either the Client object or their name string before starting up more pipelines. But I can't seem to get appSink to let me have a return value. How should I do this? checkAddClient :: Server -> ClientName -> AppData -> IO (Maybe Client) checkAddClient server@Server{..} name app = atomically $ do clientmap <- readTVar clients if Map.member name clientmap then return Nothing else do client <- newClient name app writeTVar clients $