git-annex/BackendChecksum.hs
Joey Hess b160748516 use a state monad
enormous reworking
2010-10-13 21:28:47 -04:00

18 lines
418 B
Haskell

{- git-annex "checksum" backend
- -}
module BackendChecksum (backend) where
import qualified BackendFile
import Data.Digest.Pure.SHA
import Types
-- based on BackendFile just with a different key type
backend = BackendFile.backend {
name = "checksum",
getKey = keyValue
}
-- checksum the file to get its key
keyValue :: FilePath -> Annex (Maybe Key)
keyValue k = error "checksum keyValue unimplemented" -- TODO