separate source of content from the filename associated with the key when generating a key

This already made migrate's code a lot simpler.
This commit is contained in:
Joey Hess 2012-06-05 19:51:03 -04:00
parent 77188ff04d
commit d3cee987ca
9 changed files with 59 additions and 57 deletions

View file

@ -20,11 +20,11 @@ backends :: [Backend]
backends = [backend]
backend :: Backend
backend = Backend {
name = "URL",
getKey = const (return Nothing),
fsckKey = Nothing
}
backend = Backend
{ name = "URL"
, getKey = const $ return Nothing
, fsckKey = Nothing
}
fromUrl :: String -> Maybe Integer -> Key
fromUrl url size = stubKey