summaryrefslogtreecommitdiff
path: root/BackendList.hs
diff options
context:
space:
mode:
Diffstat (limited to 'BackendList.hs')
-rw-r--r--BackendList.hs25
1 files changed, 2 insertions, 23 deletions
diff --git a/BackendList.hs b/BackendList.hs
index 42e237204..920f8fc0a 100644
--- a/BackendList.hs
+++ b/BackendList.hs
@@ -1,11 +1,7 @@
{- git-annex backend list
- -}
-module BackendList (
- supportedBackends,
- parseBackendList,
- lookupBackendName
-) where
+module BackendList (allBackends) where
import BackendTypes
@@ -13,25 +9,8 @@ import BackendTypes
import qualified Backend.WORM
import qualified Backend.SHA1
import qualified Backend.URL
-supportedBackends =
+allBackends =
[ Backend.WORM.backend
, Backend.SHA1.backend
, Backend.URL.backend
]
-
-{- Parses a string with a list of backend names into
- - a list of Backend objects. If the list is empty,
- - defaults to supportedBackends. -}
-parseBackendList :: String -> [Backend]
-parseBackendList s =
- if (length s == 0)
- then supportedBackends
- else map (lookupBackendName) $ words s
-
-{- Looks up a supported backend by name. -}
-lookupBackendName :: String -> Backend
-lookupBackendName s =
- if ((length matches) /= 1)
- then error $ "unknown backend " ++ s
- else matches !! 0
- where matches = filter (\b -> s == name b) supportedBackends