From 72bbe42ea51261d306b45fc0fddef57d57c54cef Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Fri, 2 Nov 2018 00:16:58 -0400 Subject: Avoid deprecated Conduit interface in library modules. --- Connection/Tcp.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Connection') diff --git a/Connection/Tcp.hs b/Connection/Tcp.hs index 35083198..97b78eda 100644 --- a/Connection/Tcp.hs +++ b/Connection/Tcp.hs @@ -26,7 +26,7 @@ module Connection.Tcp import Data.ByteString (ByteString,hGetNonBlocking) import qualified Data.ByteString.Char8 as S -- ( hPutStrLn, hPutStr, pack) -import Data.Conduit ( Source, Sink, Flush ) +import Data.Conduit ( ConduitT, Void, Flush ) #if MIN_VERSION_containers(0,5,0) import qualified Data.Map.Strict as Map import Data.Map.Strict (Map) @@ -168,7 +168,7 @@ data InOrOut = In | Out -- | These events may be read from 'serverEvent' TChannel. -- data ConnectionEvent b - = Connection (STM Bool) (Source IO b) (Sink (Flush b) IO ()) + = Connection (STM Bool) (ConduitT () b IO ()) (ConduitT (Flush b) Void IO ()) -- ^ A new connection was established | ConnectFailure SockAddr -- ^ A 'Connect' command failed. @@ -249,7 +249,7 @@ server :: -- forall (m :: * -> *) a u conkey releaseKey. (Show conkey, MonadIO m, Ord conkey) => Allocate releaseKey m - -> ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( Source IO x, Sink (Flush x) IO () ) ) + -> ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( ConduitT () x IO (), ConduitT (Flush x) Void IO () ) ) -> m (Server conkey u releaseKey x) server allocate sessionConduits = do (key,cmds) <- allocate (atomically newEmptyTMVar) @@ -438,7 +438,7 @@ socketFamily (SockAddrInet6 _ _ _ _) = AF_INET6 socketFamily (SockAddrUnix _) = AF_UNIX -conevent :: ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( Source IO x, Sink (Flush x) IO () ) ) +conevent :: ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( ConduitT () x IO (), ConduitT (Flush x) Void IO () ) ) -> ConnectionState -> ConnectionEvent x conevent sessionConduits con = Connection pingflag read write @@ -448,7 +448,7 @@ conevent sessionConduits con = Connection pingflag read write newConnection :: Ord a => Server a u1 releaseKey x - -> ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( Source IO x, Sink (Flush x) IO () ) ) + -> ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( ConduitT () x IO (), ConduitT (Flush x) Void IO () ) ) -> ConnectionParameters conkey u -> a -> u1 -- cgit v1.2.3