summaryrefslogtreecommitdiff
path: root/src/Network
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network')
-rw-r--r--src/Network/BitTorrent/Exchange.hs5
-rw-r--r--src/Network/BitTorrent/Internal.hs9
2 files changed, 1 insertions, 13 deletions
diff --git a/src/Network/BitTorrent/Exchange.hs b/src/Network/BitTorrent/Exchange.hs
index 0fd1d15a..75bd4bfd 100644
--- a/src/Network/BitTorrent/Exchange.hs
+++ b/src/Network/BitTorrent/Exchange.hs
@@ -6,11 +6,9 @@
6-- Portability : portable 6-- Portability : portable
7-- 7--
8{-# LANGUAGE OverloadedStrings #-} 8{-# LANGUAGE OverloadedStrings #-}
9{-# LANGUAGE DoAndIfThenElse #-}
10{-# LANGUAGE GeneralizedNewtypeDeriving #-} 9{-# LANGUAGE GeneralizedNewtypeDeriving #-}
11{-# LANGUAGE MultiParamTypeClasses #-} 10{-# LANGUAGE MultiParamTypeClasses #-}
12{-# LANGUAGE RecordWildCards #-} 11{-# LANGUAGE RecordWildCards #-}
13{-# LANGUAGE FlexibleContexts #-}
14{-# LANGUAGE BangPatterns #-} 12{-# LANGUAGE BangPatterns #-}
15module Network.BitTorrent.Exchange 13module Network.BitTorrent.Exchange
16 ( -- * Block 14 ( -- * Block
@@ -34,7 +32,6 @@ import Control.Applicative
34import Control.Exception 32import Control.Exception
35import Control.Concurrent 33import Control.Concurrent
36import Control.Lens 34import Control.Lens
37import Control.Monad.Fork.Class
38import Control.Monad.Reader 35import Control.Monad.Reader
39import Control.Monad.State 36import Control.Monad.State
40import Control.Monad.Trans.Resource 37import Control.Monad.Trans.Resource
@@ -111,8 +108,6 @@ instance MonadState SessionState P2P where
111 put !s = asks sessionState >>= \ref -> liftIO $ writeIORef ref s 108 put !s = asks sessionState >>= \ref -> liftIO $ writeIORef ref s
112 {-# INLINE put #-} 109 {-# INLINE put #-}
113 110
114-- TODO instance for MonadFork
115
116runSession :: SwarmSession -> PeerAddr -> P2P () -> IO () 111runSession :: SwarmSession -> PeerAddr -> P2P () -> IO ()
117runSession se addr p2p = 112runSession se addr p2p =
118 handle isIOException $ 113 handle isIOException $
diff --git a/src/Network/BitTorrent/Internal.hs b/src/Network/BitTorrent/Internal.hs
index 5ac58d46..f163cadb 100644
--- a/src/Network/BitTorrent/Internal.hs
+++ b/src/Network/BitTorrent/Internal.hs
@@ -14,15 +14,9 @@
14-- data should be modified through standalone functions. 14-- data should be modified through standalone functions.
15-- 15--
16{-# LANGUAGE OverloadedStrings #-} 16{-# LANGUAGE OverloadedStrings #-}
17{-# LANGUAGE BangPatterns #-}
18{-# LANGUAGE RecordWildCards #-} 17{-# LANGUAGE RecordWildCards #-}
19{-# LANGUAGE TemplateHaskell #-} 18{-# LANGUAGE TemplateHaskell #-}
20{-# LANGUAGE DeriveDataTypeable #-} 19{-# LANGUAGE DeriveDataTypeable #-}
21{-# LANGUAGE FlexibleInstances #-}
22{-# LANGUAGE FlexibleContexts #-}
23{-# LANGUAGE MultiParamTypeClasses #-}
24{-# LANGUAGE UndecidableInstances #-}
25{-# LANGUAGE ConstraintKinds #-}
26module Network.BitTorrent.Internal 20module Network.BitTorrent.Internal
27 ( Progress(..), startProgress 21 ( Progress(..), startProgress
28 22
@@ -79,9 +73,8 @@ import Control.Concurrent
79import Control.Concurrent.STM 73import Control.Concurrent.STM
80import Control.Concurrent.MSem as MSem 74import Control.Concurrent.MSem as MSem
81import Control.Lens 75import Control.Lens
82import Control.Monad.State
83import Control.Monad.Reader
84import Control.Exception 76import Control.Exception
77import Control.Monad.Trans
85 78
86import Data.IORef 79import Data.IORef
87import Data.Default 80import Data.Default