convert fsckKey to a Maybe
This way it's clear when a backend does not implement its own fsck checks.
This commit is contained in:
parent
50c063df06
commit
d36525e974
5 changed files with 8 additions and 6 deletions
|
@ -32,7 +32,7 @@ genBackend size
|
|||
b = Backend
|
||||
{ name = shaName size
|
||||
, getKey = keyValue size
|
||||
, fsckKey = checkKeyChecksum size
|
||||
, fsckKey = Just $ checkKeyChecksum size
|
||||
}
|
||||
|
||||
genBackendE :: SHASize -> Maybe Backend
|
||||
|
|
|
@ -21,7 +21,7 @@ backend :: Backend
|
|||
backend = Backend {
|
||||
name = "URL",
|
||||
getKey = const (return Nothing),
|
||||
fsckKey = const (return True)
|
||||
fsckKey = Nothing
|
||||
}
|
||||
|
||||
fromUrl :: String -> Key
|
||||
|
|
|
@ -18,7 +18,7 @@ backend :: Backend
|
|||
backend = Backend {
|
||||
name = "WORM",
|
||||
getKey = keyValue,
|
||||
fsckKey = const (return True)
|
||||
fsckKey = Nothing
|
||||
}
|
||||
|
||||
{- The key includes the file size, modification time, and the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue