summaryrefslogtreecommitdiff
path: root/src/Network/Kademlia
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2017-10-31 19:01:02 +0000
committerJames Crayne <jim.crayne@gmail.com>2017-10-31 19:01:02 +0000
commit08606959a26b9cbc1ceb8c8396c870612004dd38 (patch)
treedbeaba9574baf5655bcc7af31569752c329345d6 /src/Network/Kademlia
parent03ab4e36ade69a953f883d4d6f52f4a023dfda61 (diff)
obsolete cabal conditional dependency & some missing type sigs
Diffstat (limited to 'src/Network/Kademlia')
-rw-r--r--src/Network/Kademlia/Search.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Network/Kademlia/Search.hs b/src/Network/Kademlia/Search.hs
index 71107fbd..770d2f13 100644
--- a/src/Network/Kademlia/Search.hs
+++ b/src/Network/Kademlia/Search.hs
@@ -18,6 +18,7 @@ import qualified Data.Map.Strict as Map
18import Data.Maybe 18import Data.Maybe
19import qualified Data.Set as Set 19import qualified Data.Set as Set
20 ;import Data.Set (Set) 20 ;import Data.Set (Set)
21import Data.Hashable (Hashable(..)) -- for type sigs
21import System.IO 22import System.IO
22import System.IO.Error 23import System.IO.Error
23 24
@@ -173,6 +174,8 @@ search sch buckets target result = do
173 fork $ searchLoop sch target result st 174 fork $ searchLoop sch target result st
174 return st 175 return st
175 176
177searchLoop :: ( Ord addr, Ord nid, Ord ni, Show nid, Hashable nid, Hashable ni )
178 => Search nid addr tok ni r -> nid -> (r -> STM Bool) -> SearchState nid addr tok ni r -> IO ()
176searchLoop sch@Search{..} target result s@SearchState{..} = do 179searchLoop sch@Search{..} target result s@SearchState{..} = do
177 myThreadId >>= flip labelThread ("search."++show target) 180 myThreadId >>= flip labelThread ("search."++show target)
178 withTaskGroup ("search.g."++show target) searchAlpha $ \g -> fix $ \again -> do 181 withTaskGroup ("search.g."++show target) searchAlpha $ \g -> fix $ \again -> do