summaryrefslogtreecommitdiff
path: root/Kademlia.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Kademlia.hs')
-rw-r--r--Kademlia.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Kademlia.hs b/Kademlia.hs
index 7bffe4c1..63c2b494 100644
--- a/Kademlia.hs
+++ b/Kademlia.hs
@@ -114,10 +114,10 @@ contramapIR f ir = InsertionReporter
114-- | All the IO operations neccessary to maintain a Kademlia routing table. 114-- | All the IO operations neccessary to maintain a Kademlia routing table.
115data TableStateIO nid ni = TableStateIO 115data TableStateIO nid ni = TableStateIO
116 { -- | Write the routing table. Typically 'writeTVar'. 116 { -- | Write the routing table. Typically 'writeTVar'.
117 tblWrite :: R.Table ni nid -> STM () 117 tblWrite :: R.Table ni -> STM ()
118 118
119 -- | Read the routing table. Typically 'readTVar'. 119 -- | Read the routing table. Typically 'readTVar'.
120 , tblRead :: STM (R.Table ni nid) 120 , tblRead :: STM (R.Table ni)
121 121
122 -- | Issue a ping to a remote node and report 'True' if the node 122 -- | Issue a ping to a remote node and report 'True' if the node
123 -- responded within an acceptable time and 'False' otherwise. 123 -- responded within an acceptable time and 'False' otherwise.
@@ -136,7 +136,7 @@ data TableStateIO nid ni = TableStateIO
136 , tblChanged :: RoutingTableChanged ni -> STM (IO ()) 136 , tblChanged :: RoutingTableChanged ni -> STM (IO ())
137 } 137 }
138 138
139vanillaIO :: TVar (Table ni nid) -> (ni -> IO Bool) -> TableStateIO nid ni 139vanillaIO :: TVar (Table ni) -> (ni -> IO Bool) -> TableStateIO nid ni
140vanillaIO var ping = TableStateIO 140vanillaIO var ping = TableStateIO
141 { tblRead = readTVar var 141 { tblRead = readTVar var
142 , tblWrite = writeTVar var 142 , tblWrite = writeTVar var