summaryrefslogtreecommitdiff
path: root/RemoteClass.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-04-15 15:09:36 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-04-15 15:09:36 -0400
commit1e84dab4c8def55699fc1b673bd0abd0f5dc4aee (patch)
tree8565b776617ee1412d7fcaddcef215570745b73a /RemoteClass.hs
parentf7018e47e48cc61ef6e84adcff89f892cee2c8db (diff)
RemoteConfig type
Diffstat (limited to 'RemoteClass.hs')
-rw-r--r--RemoteClass.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/RemoteClass.hs b/RemoteClass.hs
index 8055c16b0..f954e4ff8 100644
--- a/RemoteClass.hs
+++ b/RemoteClass.hs
@@ -15,6 +15,8 @@ import Data.Map as M
import qualified GitRepo as Git
import Key
+type RemoteConfig = M.Map String String
+
{- There are different types of remotes. -}
data RemoteType a = RemoteType {
-- human visible type name
@@ -22,9 +24,9 @@ data RemoteType a = RemoteType {
-- enumerates remotes of this type
enumerate :: a [Git.Repo],
-- generates a remote of this type
- generate :: Git.Repo -> String -> Maybe (M.Map String String) -> a (Remote a),
+ generate :: Git.Repo -> String -> Maybe RemoteConfig -> a (Remote a),
-- initializes or changes a remote
- setup :: String -> M.Map String String -> a (M.Map String String)
+ setup :: String -> RemoteConfig -> a RemoteConfig
}
{- An individual remote. -}
@@ -48,7 +50,7 @@ data Remote a = Remote {
-- operation.
hasKeyCheap :: Bool,
-- a Remote can have a persistent configuration store
- config :: Maybe (M.Map String String)
+ config :: Maybe RemoteConfig
}
instance Show (Remote a) where