diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-12-06 15:40:31 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-12-06 15:43:03 -0400 |
commit | 5258f572d494d015c6c6e60c37a215bb95048bbd (patch) | |
tree | a59d9ca7ad399b5105da152b8ee0e539582d58c3 /P2P/Annex.hs | |
parent | 03a65c127403e731d7866ee3bbe397fcae7c7761 (diff) |
refactor
Diffstat (limited to 'P2P/Annex.hs')
-rw-r--r-- | P2P/Annex.hs | 8 |
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) |