[Haskell-cafe] Conduit & state
Toby Goodwin
toby at paccrat.org
Fri Jul 18 14:07:24 UTC 2014
Hi Pavel,
>runUnixServer (serverSettings socket) $ \appData ->
> ...
>I want to store some data in priority queue in Monad.State and be able to
>access it inside the handleBS (now: handleBS :: ByteString -> ByteString).
Funnily enough, I've just been looking at an analogous problem (with
runTCPClient and Persistent).
It seems that in the recent move from conduit-network to conduit-extra, the
run*Client and run*Server functions were specialized to the IO
monad. I don't know what the motivation for this change was (simpler
error messages perhaps?) but it does seem unhelpful.
The workaround I deployed last night was to roll my own runTCPClient'
which merges the code from the (deprecated) conduit-network package and
the (current) streaming-commons, but this is hardly satisfactory. I'm
sure I must be missing something.
(I don't know if there's a better list to discuss conduit.)
Toby.
More information about the Haskell-Cafe
mailing list