Copyright | Copyright (C) 2009 John MacFarlane |
---|---|
License | BSD 3 |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Stability | alpha |
Portability | GHC 6.10 required |
Safe Haskell | Safe |
Language | Haskell98 |
Type definitions for Data.FileStore.
Synopsis
- type RevisionId = String
- data Resource
- data Author = Author {}
- data Change
- type Description = String
- data Revision = Revision {}
- class Contents a where
- fromByteString :: ByteString -> a
- toByteString :: a -> ByteString
- data TimeRange = TimeRange {}
- data MergeInfo = MergeInfo {}
- data FileStoreError
- data SearchMatch = SearchMatch {}
- data SearchQuery = SearchQuery {}
- defaultSearchQuery :: SearchQuery
- data UTCTime
- data FileStore = FileStore {
- initialize :: IO ()
- save :: forall a. Contents a => FilePath -> Author -> Description -> a -> IO ()
- retrieve :: forall a. Contents a => FilePath -> Maybe RevisionId -> IO a
- delete :: FilePath -> Author -> Description -> IO ()
- rename :: FilePath -> FilePath -> Author -> Description -> IO ()
- history :: [FilePath] -> TimeRange -> Maybe Int -> IO [Revision]
- latest :: FilePath -> IO RevisionId
- revision :: RevisionId -> IO Revision
- index :: IO [FilePath]
- directory :: FilePath -> IO [Resource]
- idsMatch :: RevisionId -> RevisionId -> Bool
- search :: SearchQuery -> IO [SearchMatch]
Documentation
type RevisionId = String Source #
Author | |
|
type Description = String Source #
Revision | |
|
class Contents a where Source #
fromByteString :: ByteString -> a Source #
toByteString :: a -> ByteString Source #
Instances
Contents String Source # | |
Defined in Data.FileStore.Types fromByteString :: ByteString -> String Source # toByteString :: String -> ByteString Source # | |
Contents ByteString Source # | |
Defined in Data.FileStore.Types fromByteString :: ByteString -> ByteString Source # toByteString :: ByteString -> ByteString Source # |
MergeInfo | |
|
data FileStoreError Source #
RepositoryExists | Tried to initialize a repo that exists |
ResourceExists | Tried to create a resource that exists |
NotFound | Requested resource was not found |
IllegalResourceName | The specified resource name is illegal |
Unchanged | The resource was not modified, because the contents were unchanged |
UnsupportedOperation | |
NoMaxCount | The darcs version used does not support --max-count |
UnknownError String |
Instances
Eq FileStoreError Source # | |
Defined in Data.FileStore.Types (==) :: FileStoreError -> FileStoreError -> Bool # (/=) :: FileStoreError -> FileStoreError -> Bool # | |
Read FileStoreError Source # | |
Defined in Data.FileStore.Types readsPrec :: Int -> ReadS FileStoreError # readList :: ReadS [FileStoreError] # | |
Show FileStoreError Source # | |
Defined in Data.FileStore.Types showsPrec :: Int -> FileStoreError -> ShowS # show :: FileStoreError -> String # showList :: [FileStoreError] -> ShowS # | |
Exception FileStoreError Source # | |
Defined in Data.FileStore.Types |
data SearchMatch Source #
Instances
Eq SearchMatch Source # | |
Defined in Data.FileStore.Types (==) :: SearchMatch -> SearchMatch -> Bool # (/=) :: SearchMatch -> SearchMatch -> Bool # | |
Read SearchMatch Source # | |
Defined in Data.FileStore.Types readsPrec :: Int -> ReadS SearchMatch # readList :: ReadS [SearchMatch] # readPrec :: ReadPrec SearchMatch # readListPrec :: ReadPrec [SearchMatch] # | |
Show SearchMatch Source # | |
Defined in Data.FileStore.Types showsPrec :: Int -> SearchMatch -> ShowS # show :: SearchMatch -> String # showList :: [SearchMatch] -> ShowS # |
data SearchQuery Source #
SearchQuery | |
|
Instances
Eq SearchQuery Source # | |
Defined in Data.FileStore.Types (==) :: SearchQuery -> SearchQuery -> Bool # (/=) :: SearchQuery -> SearchQuery -> Bool # | |
Read SearchQuery Source # | |
Defined in Data.FileStore.Types readsPrec :: Int -> ReadS SearchQuery # readList :: ReadS [SearchQuery] # readPrec :: ReadPrec SearchQuery # readListPrec :: ReadPrec [SearchQuery] # | |
Show SearchQuery Source # | |
Defined in Data.FileStore.Types showsPrec :: Int -> SearchQuery -> ShowS # show :: SearchQuery -> String # showList :: [SearchQuery] -> ShowS # |
This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.
Instances
Eq UTCTime | |
Data UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UTCTime -> c UTCTime # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UTCTime # toConstr :: UTCTime -> Constr # dataTypeOf :: UTCTime -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UTCTime) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UTCTime) # gmapT :: (forall b. Data b => b -> b) -> UTCTime -> UTCTime # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r # gmapQ :: (forall d. Data d => d -> u) -> UTCTime -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UTCTime -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime # | |
Ord UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime | |
NFData UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime | |
FormatTime UTCTime | |
Defined in Data.Time.Format formatCharacter :: Char -> Maybe (TimeLocale -> Maybe NumericPadOption -> Maybe Int -> UTCTime -> String) # | |
ParseTime UTCTime | |
Defined in Data.Time.Format.Parse |
A versioning filestore, which can be implemented using the file system, a database, or revision-control software.
FileStore | |
|