summaryrefslogtreecommitdiff
path: root/BackendTypes.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-14 20:05:04 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-14 20:05:04 -0400
commit4c3ad80f320d3c4cccc3e41e4f2364155bae22a1 (patch)
tree5c09b65168929801291f2d5f84250a88e53d5394 /BackendTypes.hs
parentb8ba60428a0b4c077482560757e830e9ba02a823 (diff)
bugfix
Diffstat (limited to 'BackendTypes.hs')
-rw-r--r--BackendTypes.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/BackendTypes.hs b/BackendTypes.hs
index e0f5f7373..41ff7e506 100644
--- a/BackendTypes.hs
+++ b/BackendTypes.hs
@@ -36,6 +36,14 @@ instance Read Key where
b = l !! 0
k = join ":" $ drop 1 l
+-- pulls the backend name out
+backendName :: Key -> BackendName
+backendName (Key (b,k)) = b
+
+-- pulls the key fragment out
+keyFrag :: Key -> KeyFrag
+keyFrag (Key (b,k)) = k
+
-- this structure represents a key/value backend
data Backend = Backend {
-- name of this backend