diff options
author | Joey Hess <joey@kitenet.net> | 2011-12-31 04:11:39 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-12-31 04:11:58 -0400 |
commit | 4a02c2ea629e1825c824bcc09449806b12408699 (patch) | |
tree | fc00de3f710c2e2b2bbc6d4f99d576158648eb0b /Backend | |
parent | a2ec2d3760f5ae17836ade3b0238dde7f9de5bd2 (diff) |
type alias cleanup
Diffstat (limited to 'Backend')
-rw-r--r-- | Backend/SHA.hs | 8 | ||||
-rw-r--r-- | Backend/URL.hs | 6 | ||||
-rw-r--r-- | Backend/WORM.hs | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/Backend/SHA.hs b/Backend/SHA.hs index eca312944..a1124dfe2 100644 --- a/Backend/SHA.hs +++ b/Backend/SHA.hs @@ -21,21 +21,21 @@ type SHASize = Int sizes :: [Int] sizes = [256, 1, 512, 224, 384] -backends :: [Backend Annex] +backends :: [Backend] backends = catMaybes $ map genBackend sizes ++ map genBackendE sizes -genBackend :: SHASize -> Maybe (Backend Annex) +genBackend :: SHASize -> Maybe Backend genBackend size | isNothing (shaCommand size) = Nothing | otherwise = Just b where - b = Types.Backend.Backend + b = Backend { name = shaName size , getKey = keyValue size , fsckKey = checkKeyChecksum size } -genBackendE :: SHASize -> Maybe (Backend Annex) +genBackendE :: SHASize -> Maybe Backend genBackendE size = case genBackend size of Nothing -> Nothing diff --git a/Backend/URL.hs b/Backend/URL.hs index 32a72335a..7f621b00f 100644 --- a/Backend/URL.hs +++ b/Backend/URL.hs @@ -14,11 +14,11 @@ import Common.Annex import Types.Backend import Types.Key -backends :: [Backend Annex] +backends :: [Backend] backends = [backend] -backend :: Backend Annex -backend = Types.Backend.Backend { +backend :: Backend +backend = Backend { name = "URL", getKey = const (return Nothing), fsckKey = const (return True) diff --git a/Backend/WORM.hs b/Backend/WORM.hs index 5a3e2d694..ae9833e30 100644 --- a/Backend/WORM.hs +++ b/Backend/WORM.hs @@ -11,11 +11,11 @@ import Common.Annex import Types.Backend import Types.Key -backends :: [Backend Annex] +backends :: [Backend] backends = [backend] -backend :: Backend Annex -backend = Types.Backend.Backend { +backend :: Backend +backend = Backend { name = "WORM", getKey = keyValue, fsckKey = const (return True) |