diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-01 21:56:04 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-01 21:56:04 -0400 |
commit | 703c437bd9c6cb9e4675b65ac2b107f76b135d71 (patch) | |
tree | a6f35036bdd2b33aca50fd899448a0f6e3b60507 /Command | |
parent | 971ab27e7820a3228f71dd42f3e870c0fc2f4345 (diff) |
rename modules for data types into Types/ directory
Diffstat (limited to 'Command')
-rw-r--r-- | Command/DropUnused.hs | 2 | ||||
-rw-r--r-- | Command/FromKey.hs | 2 | ||||
-rw-r--r-- | Command/InitRemote.hs | 16 | ||||
-rw-r--r-- | Command/Status.hs | 10 |
4 files changed, 15 insertions, 15 deletions
diff --git a/Command/DropUnused.hs b/Command/DropUnused.hs index 1bb3b7f97..0f9981447 100644 --- a/Command/DropUnused.hs +++ b/Command/DropUnused.hs @@ -22,7 +22,7 @@ import qualified Command.Move import qualified Remote import qualified GitRepo as Git import Backend -import Key +import Types.Key import Utility type UnusedMap = M.Map String Key diff --git a/Command/FromKey.hs b/Command/FromKey.hs index ca61094eb..34816d657 100644 --- a/Command/FromKey.hs +++ b/Command/FromKey.hs @@ -18,7 +18,7 @@ import Utility import qualified Backend import Content import Messages -import Key +import Types.Key command :: [Command] command = [repoCommand "fromkey" paramPath seek diff --git a/Command/InitRemote.hs b/Command/InitRemote.hs index 460f14de2..41d3c37c7 100644 --- a/Command/InitRemote.hs +++ b/Command/InitRemote.hs @@ -16,7 +16,7 @@ import Data.String.Utils import Command import qualified Annex import qualified Remote -import qualified RemoteClass +import qualified Types.Remote as R import qualified GitRepo as Git import Utility import Types @@ -54,12 +54,12 @@ start ws = notBareRepo $ do else err $ "Either a new name, or one of these existing special remotes: " ++ join " " names -perform :: RemoteClass.RemoteType Annex -> UUID -> RemoteClass.RemoteConfig -> CommandPerform +perform :: R.RemoteType Annex -> UUID -> R.RemoteConfig -> CommandPerform perform t u c = do - c' <- RemoteClass.setup t u c + c' <- R.setup t u c next $ cleanup u c' -cleanup :: UUID -> RemoteClass.RemoteConfig -> CommandCleanup +cleanup :: UUID -> R.RemoteConfig -> CommandCleanup cleanup u c = do Remote.configSet u c g <- Annex.gitRepo @@ -73,7 +73,7 @@ cleanup u c = do return True {- Look up existing remote's UUID and config by name, or generate a new one -} -findByName :: String -> Annex (UUID, RemoteClass.RemoteConfig) +findByName :: String -> Annex (UUID, R.RemoteConfig) findByName name = do m <- Remote.readRemoteLog maybe generate return $ findByName' name m @@ -82,7 +82,7 @@ findByName name = do uuid <- liftIO $ genUUID return (uuid, M.insert nameKey name M.empty) -findByName' :: String -> M.Map UUID RemoteClass.RemoteConfig -> Maybe (UUID, RemoteClass.RemoteConfig) +findByName' :: String -> M.Map UUID R.RemoteConfig -> Maybe (UUID, R.RemoteConfig) findByName' n m = if null matches then Nothing else Just $ head matches where matches = filter (matching . snd) $ M.toList m @@ -98,14 +98,14 @@ remoteNames = do return $ catMaybes $ map ((M.lookup nameKey) . snd) $ M.toList m {- find the specified remote type -} -findType :: RemoteClass.RemoteConfig -> Annex (RemoteClass.RemoteType Annex) +findType :: R.RemoteConfig -> Annex (R.RemoteType Annex) findType config = maybe unspecified specified $ M.lookup typeKey config where unspecified = error "Specify the type of remote with type=" specified s = case filter (findtype s) Remote.remoteTypes of [] -> error $ "Unknown remote type " ++ s (t:_) -> return t - findtype s i = RemoteClass.typename i == s + findtype s i = R.typename i == s {- The name of a configured remote is stored in its config using this key. -} nameKey :: String diff --git a/Command/Status.hs b/Command/Status.hs index dd518416c..1a7f694ba 100644 --- a/Command/Status.hs +++ b/Command/Status.hs @@ -14,8 +14,8 @@ import Data.List import qualified Data.Map as M import qualified Annex -import qualified BackendClass -import qualified RemoteClass +import qualified Types.Backend as B +import qualified Types.Remote as R import qualified Remote import qualified Command.Unused import qualified GitRepo as Git @@ -23,7 +23,7 @@ import Command import Types import DataUnits import Content -import Key +import Types.Key import Locations -- a named computation that produces a statistic @@ -97,11 +97,11 @@ showStat s = calc =<< s supported_backends :: Stat supported_backends = stat "supported backends" $ lift (Annex.getState Annex.supportedBackends) >>= - return . unwords . (map BackendClass.name) + return . unwords . (map B.name) supported_remote_types :: Stat supported_remote_types = stat "supported remote types" $ - return $ unwords $ map RemoteClass.typename Remote.remoteTypes + return $ unwords $ map R.typename Remote.remoteTypes local_annex_size :: Stat local_annex_size = stat "local annex size" $ |