Skip to content

Commit

Permalink
Fix compilation warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
qnikst committed Mar 10, 2016
1 parent 8b74cce commit 86c2366
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 25 deletions.
10 changes: 3 additions & 7 deletions src/Control/Distributed/Process/Debug.hs
Expand Up @@ -141,17 +141,14 @@ module Control.Distributed.Process.Debug
)
where

import Control.Applicative ((<$>))
import Control.Applicative
import Control.Distributed.Process.Internal.Primitives
( proxy
, finally
, die
, whereis
, send
, receiveWait
, matchIf
, finally
, try
, monitor
)
import Control.Distributed.Process.Internal.Types
Expand Down Expand Up @@ -196,12 +193,11 @@ import Control.Exception (SomeException)

import Control.Monad.IO.Class (liftIO)
import Control.Monad.Reader (ask)
import Control.Monad.Catch (finally, try)

import Data.Binary()

#if ! MIN_VERSION_base(4,6,0)
import Prelude hiding (catch)
#endif
import Prelude

--------------------------------------------------------------------------------
-- Debugging/Tracing API --
Expand Down
5 changes: 3 additions & 2 deletions src/Control/Distributed/Process/Management.hs
Expand Up @@ -242,7 +242,7 @@ module Control.Distributed.Process.Management
, liftMX
) where

import Control.Applicative ((<$>))
import Control.Applicative
import Control.Concurrent.STM (atomically)
import Control.Concurrent.STM.TChan
( readTChan
Expand All @@ -254,7 +254,6 @@ import Control.Distributed.Process.Internal.Primitives
, matchAny
, matchSTM
, unwrapMessage
, onException
, register
, whereis
, die
Expand All @@ -281,12 +280,14 @@ import Control.Distributed.Process.Management.Internal.Types
import Control.Distributed.Process.Serializable (Serializable)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Reader (ask)
import Control.Monad.Catch (onException)
import qualified Control.Monad.State as ST
( get
, modify
, lift
, runStateT
)
import Prelude

-- | Publishes an arbitrary @Serializable@ message to the management event bus.
-- Note that /no attempt is made to force the argument/, therefore it is very
Expand Down
3 changes: 2 additions & 1 deletion src/Control/Distributed/Process/Management/Internal/Agent.hs
Expand Up @@ -3,7 +3,7 @@

module Control.Distributed.Process.Management.Internal.Agent where

import Control.Applicative ((<$>))
import Control.Applicative
import Control.Concurrent (forkIO)
import Control.Concurrent.MVar (MVar, newEmptyMVar, putMVar, takeMVar)
import Control.Concurrent.STM (atomically)
Expand Down Expand Up @@ -44,6 +44,7 @@ import Control.Monad (void)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Reader (ask)
import GHC.Weak (Weak, deRefWeak)
import Prelude

--------------------------------------------------------------------------------
-- Agent Controller Implementation --
Expand Down
Expand Up @@ -28,7 +28,7 @@ module Control.Distributed.Process.Management.Internal.Trace.Primitives
, withRegisteredTracer
) where

import Control.Applicative ((<$>))
import Control.Applicative
import Control.Distributed.Process.Internal.Primitives
( whereis
, newChan
Expand Down Expand Up @@ -67,6 +67,7 @@ import Control.Monad.IO.Class (liftIO)
import Control.Monad.Reader (ask)

import qualified Data.Set as Set (fromList)
import Prelude

--------------------------------------------------------------------------------
-- Main API --
Expand Down
19 changes: 5 additions & 14 deletions src/Control/Distributed/Process/Node.hs
Expand Up @@ -20,10 +20,6 @@ module Control.Distributed.Process.Node

-- TODO: Calls to 'sendBinary' and co (by the NC) may stall the node controller.

#if ! MIN_VERSION_base(4,6,0)
import Prelude hiding (catch)
#endif

import System.IO (fixIO, hPutStrLn, stderr)
import System.Mem.Weak (Weak, deRefWeak)
import qualified Data.ByteString.Lazy as BSL (fromChunks)
Expand Down Expand Up @@ -52,15 +48,14 @@ import Data.Foldable (forM_)
import Data.Maybe (isJust, fromJust, isNothing, catMaybes)
import Data.Typeable (Typeable)
import Control.Category ((>>>))
import Control.Applicative (Applicative, (<$>))
import Control.Applicative
import Control.Monad (void, when, join)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad.State.Strict (MonadState, StateT, evalStateT, gets)
import qualified Control.Monad.State.Strict as StateT (get, put)
import Control.Monad.Reader (MonadReader, ReaderT, runReaderT, ask)
import Control.Exception
( throwIO
, AsyncException(ThreadKilled)
, SomeException
, Exception
, throwTo
Expand All @@ -72,12 +67,11 @@ import qualified Control.Exception as Exception
, catches
, finally
)
import Control.Concurrent (forkIO, forkIOWithUnmask, killThread, myThreadId)
import Control.Concurrent (forkIO, forkIOWithUnmask, killThread)
import Control.Distributed.Process.Internal.StrictMVar
( newMVar
, withMVar
, modifyMVarMasked
, modifyMVar_
, modifyMVar
, newEmptyMVar
, putMVar
Expand Down Expand Up @@ -167,12 +161,11 @@ import Control.Distributed.Process.Internal.Types
, RegisterReply(..)
, WhereIsReply(..)
, payloadToMessage
, messageToPayload
, createUnencodedMessage
, unsafeCreateUnencodedMessage
, runLocalProcess
, firstNonReservedProcessId
, ImplicitReconnect(WithImplicitReconnect,NoImplicitReconnect)
, ImplicitReconnect(WithImplicitReconnect)
)
import Control.Distributed.Process.Management.Internal.Agent
( mxAgentController
Expand All @@ -195,7 +188,6 @@ import Control.Distributed.Process.Management.Internal.Types
import Control.Distributed.Process.Serializable (Serializable)
import Control.Distributed.Process.Internal.Messaging
( sendBinary
, sendPayload
, closeImplicitReconnections
, impliesDeathOf
)
Expand All @@ -204,7 +196,6 @@ import Control.Distributed.Process.Internal.Primitives
, receiveWait
, match
, sendChan
, try
, unwrapMessage
)
import Control.Distributed.Process.Internal.Types (SendPort, Tracer(..))
Expand All @@ -214,7 +205,9 @@ import qualified Control.Distributed.Process.Internal.StrictContainerAccessors a
( mapMaybe
, mapDefault
)
import Control.Monad.Catch (try)
import Unsafe.Coerce
import Prelude

--------------------------------------------------------------------------------
-- Initialization --
Expand Down Expand Up @@ -308,8 +301,6 @@ startServiceProcesses node = do
-- process which uses 'send' or other primitives which are traced.
register "trace.logger" logger
where
fork = forkProcess node

loop = do
receiveWait
[ match $ \((time, pid, string) ::(String, ProcessId, String)) -> do
Expand Down

0 comments on commit 86c2366

Please sign in to comment.