summaryrefslogtreecommitdiff
path: root/Kademlia.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-07-16 19:28:31 -0400
committerjoe <joe@jerkface.net>2017-07-16 19:28:31 -0400
commit74e89f729750b96b5227e4678f0922b630d71c99 (patch)
tree217faa599daa0ccd745d2d37c825e27dae328b5a /Kademlia.hs
parent30b27a0216bd85d4480463450e6f7fa60ed1ed60 (diff)
Removed /nid/ type variable from routing 'Table'.
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