summaryrefslogtreecommitdiff
path: root/Connection
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2018-11-02 00:16:58 -0400
committerJoe Crayne <joe@jerkface.net>2018-11-02 00:21:52 -0400
commit72bbe42ea51261d306b45fc0fddef57d57c54cef (patch)
treeabaf9083c9a76b377702b16eb128ba1f4c142dd3 /Connection
parentadc61071fb1c3a72f2d8f06866e0f3abaf50c6f5 (diff)
Avoid deprecated Conduit interface in library modules.
Diffstat (limited to 'Connection')
-rw-r--r--Connection/Tcp.hs10
1 files changed, 5 insertions, 5 deletions
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
26 26
27import Data.ByteString (ByteString,hGetNonBlocking) 27import Data.ByteString (ByteString,hGetNonBlocking)
28import qualified Data.ByteString.Char8 as S -- ( hPutStrLn, hPutStr, pack) 28import qualified Data.ByteString.Char8 as S -- ( hPutStrLn, hPutStr, pack)
29import Data.Conduit ( Source, Sink, Flush ) 29import Data.Conduit ( ConduitT, Void, Flush )
30#if MIN_VERSION_containers(0,5,0) 30#if MIN_VERSION_containers(0,5,0)
31import qualified Data.Map.Strict as Map 31import qualified Data.Map.Strict as Map
32import Data.Map.Strict (Map) 32import Data.Map.Strict (Map)
@@ -168,7 +168,7 @@ data InOrOut = In | Out
168-- | These events may be read from 'serverEvent' TChannel. 168-- | These events may be read from 'serverEvent' TChannel.
169-- 169--
170data ConnectionEvent b 170data ConnectionEvent b
171 = Connection (STM Bool) (Source IO b) (Sink (Flush b) IO ()) 171 = Connection (STM Bool) (ConduitT () b IO ()) (ConduitT (Flush b) Void IO ())
172 -- ^ A new connection was established 172 -- ^ A new connection was established
173 | ConnectFailure SockAddr 173 | ConnectFailure SockAddr
174 -- ^ A 'Connect' command failed. 174 -- ^ A 'Connect' command failed.
@@ -249,7 +249,7 @@ server ::
249 -- forall (m :: * -> *) a u conkey releaseKey. 249 -- forall (m :: * -> *) a u conkey releaseKey.
250 (Show conkey, MonadIO m, Ord conkey) => 250 (Show conkey, MonadIO m, Ord conkey) =>
251 Allocate releaseKey m 251 Allocate releaseKey m
252 -> ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( Source IO x, Sink (Flush x) IO () ) ) 252 -> ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( ConduitT () x IO (), ConduitT (Flush x) Void IO () ) )
253 -> m (Server conkey u releaseKey x) 253 -> m (Server conkey u releaseKey x)
254server allocate sessionConduits = do 254server allocate sessionConduits = do
255 (key,cmds) <- allocate (atomically newEmptyTMVar) 255 (key,cmds) <- allocate (atomically newEmptyTMVar)
@@ -438,7 +438,7 @@ socketFamily (SockAddrInet6 _ _ _ _) = AF_INET6
438socketFamily (SockAddrUnix _) = AF_UNIX 438socketFamily (SockAddrUnix _) = AF_UNIX
439 439
440 440
441conevent :: ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( Source IO x, Sink (Flush x) IO () ) ) 441conevent :: ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( ConduitT () x IO (), ConduitT (Flush x) Void IO () ) )
442 -> ConnectionState 442 -> ConnectionState
443 -> ConnectionEvent x 443 -> ConnectionEvent x
444conevent sessionConduits con = Connection pingflag read write 444conevent sessionConduits con = Connection pingflag read write
@@ -448,7 +448,7 @@ conevent sessionConduits con = Connection pingflag read write
448 448
449newConnection :: Ord a 449newConnection :: Ord a
450 => Server a u1 releaseKey x 450 => Server a u1 releaseKey x
451 -> ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( Source IO x, Sink (Flush x) IO () ) ) 451 -> ( IO (Maybe ByteString) -> (ByteString -> IO Bool) -> ( ConduitT () x IO (), ConduitT (Flush x) Void IO () ) )
452 -> ConnectionParameters conkey u 452 -> ConnectionParameters conkey u
453 -> a 453 -> a
454 -> u1 454 -> u1