aboutsummaryrefslogtreecommitdiff
path: root/Types.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-13 02:31:24 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-13 02:31:24 -0400
commitd1071bd1fe879abb3ebb229f9347f7855a697b8c (patch)
treedb9df662b58f2b0762252f4d22b5cb244c8be978 /Types.hs
parent490a3a828cbb5a4046178b36fc0f9fe0696d0e9d (diff)
autobugfixing!
Converted Key to a real data type and caught all the places where I used an unconverted filename as a key. Had to loose some sanity checks around whether something is already annexed, but I guess I can add those back other ways.
Diffstat (limited to 'Types.hs')
-rw-r--r--Types.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Types.hs b/Types.hs
index 73492dfc3..9b0bb00fd 100644
--- a/Types.hs
+++ b/Types.hs
@@ -16,7 +16,11 @@ data State = State {
} deriving (Show)
-- annexed filenames are mapped into keys
-type Key = FilePath
+data Key = Key String deriving (Eq)
+
+-- show a key to convert it to a string
+instance Show Key where
+ show (Key v) = v
-- this structure represents a key/value backend
data Backend = Backend {