add a UUID type
Should have done this a long time ago.
This commit is contained in:
parent
b08f7c428b
commit
63a292324d
18 changed files with 67 additions and 55 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue