git.iko.soy/distributed-process
on master help sign in
Remove warnings
commit5ce14bfc09ec46509c32b9f8990ae40c8db36b1d authorEdsko de Vries <edsko@edsko.net> dateThu 10 May 2012, 21:09 (14 years ago) parent305bd0a
2 files changed+6−5
network-transport-2/tests/TestTCP.hs+4−3 network-transport-2/tests/Traced.hs+2−2
network-transport-2/tests/TestTCP.hs+4−3
@@ -1,4 +1,5 @@
11{-# LANGUAGE RebindableSyntax #-}
2+{-# OPTIONS_GHC -fno-warn-orphans #-}
23module Main where
34
45import Prelude hiding (catch, (>>=), (>>), return, fail)
@@ -78,14 +79,14 @@ testEarlyDisconnect = do
7879 ConnectionOpened cid _ addr <- liftIO $ receive endpoint
7980 True <- return $ addr == theirAddr
8081
81− ErrorEvent (ErrorEventConnectionLost addr [cid']) <- liftIO $ receive endpoint
82− True <- return $ addr == theirAddr && cid' == cid
82+ ErrorEvent (ErrorEventConnectionLost addr' [cid']) <- liftIO $ receive endpoint
83+ True <- return $ addr' == theirAddr && cid' == cid
8384
8485 -- Second test: after they dropped their connection to us, we now try to
8586 -- establish a connection to them. This should re-establish the broken
8687 -- TCP connection.
8788 trlog "Trying to connect to client"
88− Right conn <- liftIO $ connect endpoint theirAddr ReliableOrdered
89+ Right _ <- liftIO $ connect endpoint theirAddr ReliableOrdered
8990
9091
9192 return ()
network-transport-2/tests/Traced.hs+2−2
@@ -108,7 +108,7 @@ class MonadS m where
108108 returnS :: a -> m a
109109 bindS :: Show a => m a -> (a -> m b) -> m b
110110 failS :: String -> m a
111− seqS :: Show a => m a -> m b -> m b
111+ seqS :: m a -> m b -> m b
112112
113113instance MonadS IO where
114114 returnS = Prelude.return
@@ -128,7 +128,7 @@ instance MonadS Traced where
128128 x `seqS` y = Traced $ unTraced x Prelude.>>= \(trace, result) ->
129129 case result of
130130 Left err -> Prelude.return (trace, Left err)
131− Right a -> unTraced y Prelude.>>= \(trace', result') ->
131+ Right _ -> unTraced y Prelude.>>= \(trace', result') ->
132132 Prelude.return (trace ++ trace', result')
133133 failS err = Traced $ Prelude.return ([], Left err)
134134