summaryrefslogtreecommitdiff
path: root/Types/Remote.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-07 14:46:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-07 15:59:16 -0400
commit63a292324d20832b68c92f784828e55e644481cc (patch)
treef49c7077caf738cd285681421f9c9baa03068c99 /Types/Remote.hs
parentb08f7c428b4bc9eabd95596d08594ddd1057a0bf (diff)
add a UUID type
Should have done this a long time ago.
Diffstat (limited to 'Types/Remote.hs')
-rw-r--r--Types/Remote.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Types/Remote.hs b/Types/Remote.hs
index 49f16bfdd..0a4a0fa88 100644
--- a/Types/Remote.hs
+++ b/Types/Remote.hs
@@ -15,6 +15,7 @@ import Data.Ord
import qualified Git
import Types.Key
+import Types.UUID
type RemoteConfig = M.Map String String
@@ -25,15 +26,15 @@ data RemoteType a = RemoteType {
-- enumerates remotes of this type
enumerate :: a [Git.Repo],
-- generates a remote of this type
- generate :: Git.Repo -> String -> Maybe RemoteConfig -> a (Remote a),
+ generate :: Git.Repo -> UUID -> Maybe RemoteConfig -> a (Remote a),
-- initializes or changes a remote
- setup :: String -> RemoteConfig -> a RemoteConfig
+ setup :: UUID -> RemoteConfig -> a RemoteConfig
}
{- An individual remote. -}
data Remote a = Remote {
-- each Remote has a unique uuid
- uuid :: String,
+ uuid :: UUID,
-- each Remote has a human visible name
name :: String,
-- Remotes have a use cost; higher is more expensive