diff options
author | Joey Hess <joey@kitenet.net> | 2011-12-31 04:11:39 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-12-31 04:11:58 -0400 |
commit | 4a02c2ea629e1825c824bcc09449806b12408699 (patch) | |
tree | fc00de3f710c2e2b2bbc6d4f99d576158648eb0b /Types | |
parent | a2ec2d3760f5ae17836ade3b0238dde7f9de5bd2 (diff) |
type alias cleanup
Diffstat (limited to 'Types')
-rw-r--r-- | Types/Backend.hs | 6 | ||||
-rw-r--r-- | Types/Remote.hs | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/Types/Backend.hs b/Types/Backend.hs index 4f8226704..c9daa4671 100644 --- a/Types/Backend.hs +++ b/Types/Backend.hs @@ -11,7 +11,7 @@ module Types.Backend where import Types.Key -data Backend a = Backend { +data BackendA a = Backend { -- name of this backend name :: String, -- converts a filename to a key @@ -20,8 +20,8 @@ data Backend a = Backend { fsckKey :: Key -> a Bool } -instance Show (Backend a) where +instance Show (BackendA a) where show backend = "Backend { name =\"" ++ name backend ++ "\" }" -instance Eq (Backend a) where +instance Eq (BackendA a) where a == b = name a == name b diff --git a/Types/Remote.hs b/Types/Remote.hs index 3a8a23f31..e44e2a9de 100644 --- a/Types/Remote.hs +++ b/Types/Remote.hs @@ -19,22 +19,22 @@ import Types.UUID type RemoteConfig = M.Map String String {- There are different types of remotes. -} -data RemoteType a = RemoteType { +data RemoteTypeA a = RemoteType { -- human visible type name typename :: String, -- enumerates remotes of this type enumerate :: a [Git.Repo], -- generates a remote of this type - generate :: Git.Repo -> UUID -> Maybe RemoteConfig -> a (Remote a), + generate :: Git.Repo -> UUID -> Maybe RemoteConfig -> a (RemoteA a), -- initializes or changes a remote setup :: UUID -> RemoteConfig -> a RemoteConfig } -instance Eq (RemoteType a) where +instance Eq (RemoteTypeA a) where x == y = typename x == typename y {- An individual remote. -} -data Remote a = Remote { +data RemoteA a = Remote { -- each Remote has a unique uuid uuid :: UUID, -- each Remote has a human visible name @@ -58,16 +58,16 @@ data Remote a = Remote { -- git configuration for the remote repo :: Git.Repo, -- the type of the remote - remotetype :: RemoteType a + remotetype :: RemoteTypeA a } -instance Show (Remote a) where +instance Show (RemoteA a) where show remote = "Remote { name =\"" ++ name remote ++ "\" }" -- two remotes are the same if they have the same uuid -instance Eq (Remote a) where +instance Eq (RemoteA a) where x == y = uuid x == uuid y -- order remotes by cost -instance Ord (Remote a) where +instance Ord (RemoteA a) where compare = comparing cost |