diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-11 17:52:46 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-11 17:52:46 -0400 |
commit | ebc3fbe9ae2c5cc52332c77a92697c2517ce8263 (patch) | |
tree | f65c38ab3d452c0cde3d0d3b968c216f1ee30705 /Backend.hs | |
parent | af82586adff96f18fe768e432f501c647401262f (diff) |
explicit exports
Diffstat (limited to 'Backend.hs')
-rw-r--r-- | Backend.hs | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/Backend.hs b/Backend.hs index fb7d5666f..2d3ea42d6 100644 --- a/Backend.hs +++ b/Backend.hs @@ -16,32 +16,19 @@ - to store different files' contents in a given repository. - -} -module Backend where +module Backend ( + Key, + Backend, -- note only data type is exported, not destructors + lookupBackend, + storeFile, + dropFile +) where import System.Directory import Locations import GitRepo import Utility - --- annexed filenames are mapped into keys -type Key = FilePath - --- this structure represents a key/value backend -data Backend = Backend { - -- name of this backend - name :: String, - -- converts a filename to a key - getKey :: GitRepo -> FilePath -> IO (Maybe Key), - -- stores a file's contents to a key - storeFileKey :: GitRepo -> FilePath -> Key -> IO Bool, - -- retrieves a key's contents to a file - retrieveKeyFile :: Key -> FilePath -> IO Bool, - -- removes a key - removeKey :: Key -> IO Bool -} - -instance Show Backend where - show backend = "Backend { name =\"" ++ (name backend) ++ "\" }" +import BackendType {- Name of state file that holds the key for an annexed file, - using a given backend. -} |