Skip to content

Commit c0fd391

Browse files
committed
Tidy up unused imports and warnings.
1 parent 79cb371 commit c0fd391

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

packages/distributed-process-fsm/src/Control/Distributed/Process/FSM/Internal/Process.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,19 @@ walkPFSM st acc
121121
handleRpcRawInputs :: forall s d . (Show s) => State s d
122122
-> (P.Message, SendPort P.Message)
123123
-> Action (State s d)
124-
handleRpcRawInputs st@State{..} (msg, port) =
124+
handleRpcRawInputs st (msg, port) =
125125
handleInput msg $ st { stReply = (sendChan port), stTrans = Q.empty, stInput = Just msg }
126126

127127
handleAllRawInputs :: forall s d. (Show s) => State s d
128128
-> P.Message
129129
-> Action (State s d)
130-
handleAllRawInputs st@State{..} msg =
130+
handleAllRawInputs st msg =
131131
handleInput msg $ st { stReply = noOp, stTrans = Q.empty, stInput = Just msg }
132132

133133
handleExitReason :: forall s d. (Show s) => State s d
134134
-> P.Message
135135
-> Process (Maybe (ProcessAction (State s d)))
136-
handleExitReason st@State{..} msg =
136+
handleExitReason st msg =
137137
let st' = st { stReply = noOp, stTrans = Q.empty, stInput = Just msg }
138138
in tryHandleInput st' msg
139139

packages/distributed-process-fsm/src/Control/Distributed/Process/FSM/Internal/Types.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ import Data.Sequence
9393
)
9494
import qualified Data.Sequence as Q (null)
9595
import Data.Typeable (Typeable, typeOf)
96-
import Data.Tuple (swap, uncurry)
96+
import Data.Tuple (swap)
9797
import GHC.Generics
9898

9999
-- | The internal state of an FSM process.
@@ -312,7 +312,6 @@ apply st msg step
312312
setProcessState s'
313313
-- (_, st') <- runFSM st (addTransition ev)
314314
return $ enqueue st (Just ev)
315-
| otherwise = error $ baseErr ++ ".Internal.Types.apply:InvalidStep"
316315
where
317316
mstash = return . uncurry enqueue . swap
318317
stash (o, s) = return $ enqueue s (Just o)

packages/distributed-process-fsm/tests/TestFSM.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ import Test.Tasty.HUnit (testCase, assertEqual, assertBool)
2929
import Network.Transport.TCP
3030
import qualified Network.Transport as NT
3131

32-
-- import Control.Distributed.Process.Serializable (Serializable)
33-
-- import Control.Monad (void)
3432
import Data.Binary (Binary)
3533
import Data.Maybe (fromJust)
3634
import Data.Typeable (Typeable)
@@ -157,7 +155,7 @@ republicationOfEvents = do
157155
send pid "yo"
158156
send pid On
159157

160-
res' <- receiveChanTimeout (asTimeout $ seconds 20) rp :: Process (Maybe ())
158+
_ <- receiveChanTimeout (asTimeout $ seconds 20) rp :: Process (Maybe ())
161159
liftIO $ assertEqual mempty (Just ()) res
162160

163161
kill pid "thankyou byebye"

0 commit comments

Comments
 (0)