parameterize Backend type

This allows the Backend type to not depend on the Annex type, and
so the Annex type can later be moved out of TypeInternals.
This commit is contained in:
Joey Hess 2011-01-25 21:02:34 -04:00
parent f8e303e1c9
commit 109a719b03
14 changed files with 43 additions and 41 deletions

View file

@ -43,7 +43,7 @@ type CommandCleanup = Annex Bool
- functions. -}
type CommandSeekStrings = CommandStartString -> CommandSeek
type CommandStartString = String -> CommandStart
type BackendFile = (FilePath, Maybe Backend)
type BackendFile = (FilePath, Maybe (Backend Annex))
type CommandSeekBackendFiles = CommandStartBackendFile -> CommandSeek
type CommandStartBackendFile = BackendFile -> CommandStart
type AttrFile = (FilePath, String)
@ -95,7 +95,7 @@ notAnnexed file a = do
Just _ -> return Nothing
Nothing -> a
isAnnexed :: FilePath -> ((Key, Backend) -> Annex (Maybe a)) -> Annex (Maybe a)
isAnnexed :: FilePath -> ((Key, Backend Annex) -> Annex (Maybe a)) -> Annex (Maybe a)
isAnnexed file a = do
r <- Backend.lookupFile file
case r of