aboutsummaryrefslogtreecommitdiff
path: root/P2P/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-12-06 15:40:31 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-12-06 15:43:03 -0400
commit5258f572d494d015c6c6e60c37a215bb95048bbd (patch)
treea59d9ca7ad399b5105da152b8ee0e539582d58c3 /P2P/Annex.hs
parent03a65c127403e731d7866ee3bbe397fcae7c7761 (diff)
refactor
Diffstat (limited to 'P2P/Annex.hs')
-rw-r--r--P2P/Annex.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/P2P/Annex.hs b/P2P/Annex.hs
index d0c00def3..4105abe32 100644
--- a/P2P/Annex.hs
+++ b/P2P/Annex.hs
@@ -9,7 +9,7 @@
module P2P.Annex
( RunMode(..)
- , RunEnv(..)
+ , P2PConnection(..)
, runFullProto
) where
@@ -31,12 +31,12 @@ data RunMode
| Client
-- Full interpreter for Proto, that can receive and send objects.
-runFullProto :: RunMode -> RunEnv -> Proto a -> Annex (Maybe a)
-runFullProto runmode runenv = go
+runFullProto :: RunMode -> P2PConnection -> Proto a -> Annex (Maybe a)
+runFullProto runmode conn = go
where
go :: RunProto Annex
go (Pure v) = pure (Just v)
- go (Free (Net n)) = runNet runenv go n
+ go (Free (Net n)) = runNet conn go n
go (Free (Local l)) = runLocal runmode go l
runLocal :: RunMode -> RunProto Annex -> LocalF (Proto a) -> Annex (Maybe a)