git.iko.soy/distributed-process
on master help sign in
Remove warnings
5ce14bfEdsko de Vries
network-transport-2/tests/TestTCP.hs+4−3
@@ -1,4 +1,5 @@
1{-# LANGUAGE RebindableSyntax #-}
1{-# LANGUAGE RebindableSyntax #-}
2+{-# OPTIONS_GHC -fno-warn-orphans #-}
2module Main where
3module Main where
3
4
4import Prelude hiding (catch, (>>=), (>>), return, fail)
5import Prelude hiding (catch, (>>=), (>>), return, fail)
@@ -78,14 +79,14 @@ testEarlyDisconnect = do
78 ConnectionOpened cid _ addr <- liftIO $ receive endpoint
79 ConnectionOpened cid _ addr <- liftIO $ receive endpoint
79 True <- return $ addr == theirAddr
80 True <- return $ addr == theirAddr
80
81
81− ErrorEvent (ErrorEventConnectionLost addr [cid']) <- liftIO $ receive endpoint
82+ ErrorEvent (ErrorEventConnectionLost addr' [cid']) <- liftIO $ receive endpoint
82− True <- return $ addr == theirAddr && cid' == cid
83+ True <- return $ addr' == theirAddr && cid' == cid
83
84
84 -- Second test: after they dropped their connection to us, we now try to
85 -- Second test: after they dropped their connection to us, we now try to
85 -- establish a connection to them. This should re-establish the broken
86 -- establish a connection to them. This should re-establish the broken
86 -- TCP connection.
87 -- TCP connection.
87 trlog "Trying to connect to client"
88 trlog "Trying to connect to client"
88− Right conn <- liftIO $ connect endpoint theirAddr ReliableOrdered
89+ Right _ <- liftIO $ connect endpoint theirAddr ReliableOrdered
89
90
90
91
91 return ()
92 return ()
network-transport-2/tests/Traced.hs+2−2
@@ -108,7 +108,7 @@ class MonadS m where
108 returnS :: a -> m a
108 returnS :: a -> m a
109 bindS :: Show a => m a -> (a -> m b) -> m b
109 bindS :: Show a => m a -> (a -> m b) -> m b
110 failS :: String -> m a
110 failS :: String -> m a
111− seqS :: Show a => m a -> m b -> m b
111+ seqS :: m a -> m b -> m b
112
112
113instance MonadS IO where
113instance MonadS IO where
114 returnS = Prelude.return
114 returnS = Prelude.return
@@ -128,7 +128,7 @@ instance MonadS Traced where
128 x `seqS` y = Traced $ unTraced x Prelude.>>= \(trace, result) ->
128 x `seqS` y = Traced $ unTraced x Prelude.>>= \(trace, result) ->
129 case result of
129 case result of
130 Left err -> Prelude.return (trace, Left err)
130 Left err -> Prelude.return (trace, Left err)
131− Right a -> unTraced y Prelude.>>= \(trace', result') ->
131+ Right _ -> unTraced y Prelude.>>= \(trace', result') ->
132 Prelude.return (trace ++ trace', result')
132 Prelude.return (trace ++ trace', result')
133 failS err = Traced $ Prelude.return ([], Left err)
133 failS err = Traced $ Prelude.return ([], Left err)
134
134