diff options
author | James Crayne <jim.crayne@gmail.com> | 2017-10-31 19:01:02 +0000 |
---|---|---|
committer | James Crayne <jim.crayne@gmail.com> | 2017-10-31 19:01:02 +0000 |
commit | 08606959a26b9cbc1ceb8c8396c870612004dd38 (patch) | |
tree | dbeaba9574baf5655bcc7af31569752c329345d6 /src/Network/Kademlia | |
parent | 03ab4e36ade69a953f883d4d6f52f4a023dfda61 (diff) |
obsolete cabal conditional dependency & some missing type sigs
Diffstat (limited to 'src/Network/Kademlia')
-rw-r--r-- | src/Network/Kademlia/Search.hs | 3 |
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 | |||
18 | import Data.Maybe | 18 | import Data.Maybe |
19 | import qualified Data.Set as Set | 19 | import qualified Data.Set as Set |
20 | ;import Data.Set (Set) | 20 | ;import Data.Set (Set) |
21 | import Data.Hashable (Hashable(..)) -- for type sigs | ||
21 | import System.IO | 22 | import System.IO |
22 | import System.IO.Error | 23 | import 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 | ||
177 | searchLoop :: ( 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 () | ||
176 | searchLoop sch@Search{..} target result s@SearchState{..} = do | 179 | searchLoop 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 |