fix type signature of fediChordInit

This commit is contained in:
Trolli Schmittlauch 2020-07-30 01:30:42 +02:00
parent 98ca0ff13e
commit 4bf8091143

View file

@ -95,10 +95,10 @@ import Debug.Trace (trace)
-- | initialise data structures, compute own IDs and bind to listening socket
-- ToDo: load persisted state, thus this function already operates in IO
--fediChordInit :: (DHT d, Service s d)
-- => FediChordConf
-- -> (d -> s d) -- ^ runner function for service
-- -> IO (Socket, LocalNodeStateSTM)
fediChordInit :: (Service s RealNodeSTM)
=> FediChordConf
-> (RealNodeSTM -> IO (s RealNodeSTM)) -- ^ runner function for service
-> IO (Socket, LocalNodeStateSTM)
fediChordInit initConf serviceRunner = do
emptyLookupCache <- newTVarIO Map.empty
let realNode = RealNode {