From 45ae804a31ff9e9db9bc9ec3a1a29230ee48a033 Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Sat, 3 Oct 2015 09:51:45 +0530
Subject: [PATCH] Tracker: remove vestiges of the older code and module imports

---
 src/FuncTorrent/Tracker.hs | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/FuncTorrent/Tracker.hs b/src/FuncTorrent/Tracker.hs
index 11cecd5..3926a12 100644
--- a/src/FuncTorrent/Tracker.hs
+++ b/src/FuncTorrent/Tracker.hs
@@ -8,8 +8,7 @@ module FuncTorrent.Tracker
 import Prelude hiding (lookup, splitAt)
 
 import Control.Concurrent (threadDelay)
-import Control.Concurrent.MVar (MVar, newEmptyMVar, newMVar, readMVar, putMVar, takeMVar)
-import Control.Monad.State
+import Control.Concurrent.MVar (MVar, newEmptyMVar, newMVar, readMVar, putMVar)
 import Data.ByteString (ByteString)
 import Data.ByteString.Char8 as BC (pack, unpack, splitAt)
 import Data.Char (chr)
@@ -123,9 +122,9 @@ mkArgs port peer_id up down m =
 
 trackerLoop :: PortNumber -> String -> Metainfo -> TState -> IO ByteString
 trackerLoop port peerId m st = do
-  up <- liftIO $ readMVar $ uploaded st
-  down <- liftIO $ readMVar $ downloaded st
-  resp <- liftIO $ sendGetRequest (head . announceList $ m) $ mkArgs port peerId up down m
+  up <- readMVar $ uploaded st
+  down <- readMVar $ downloaded st
+  resp <- sendGetRequest (head . announceList $ m) $ mkArgs port peerId up down m
   case decode resp of
     Left e -> return $ pack (show e)
     Right trackerInfo ->
-- 
2.45.2