| 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-Inferred |
| Language | Haskell98 |
Data.FileStore.Types
Description
Type definitions for Data.FileStore.
Synopsis
- type RevisionId = String
- data Resource
- = FSFile FilePath
- | FSDirectory FilePath
- data Author = Author {
- authorName :: String
- authorEmail :: String
- data Change
- type Description = String
- data Revision = Revision {}
- class Contents a where
- fromByteString :: ByteString -> a
- toByteString :: a -> ByteString
- data TimeRange = TimeRange {}
- data MergeInfo = MergeInfo {
- mergeRevision :: Revision
- mergeConflicts :: Bool
- mergeText :: String
- data FileStoreError
- data SearchMatch = SearchMatch {
- matchResourceName :: FilePath
- matchLineNumber :: Integer
- matchLine :: String
- data SearchQuery = SearchQuery {
- queryPatterns :: [String]
- queryWholeWords :: Bool
- queryMatchAll :: Bool
- queryIgnoreCase :: Bool
- 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 #
Constructors
| FSFile FilePath | |
| FSDirectory FilePath |
Constructors
| Author | |
Fields
| |
type Description = String Source #
Constructors
| Revision | |
Fields
| |
class Contents a where Source #
Instances
| Contents ByteString Source # | |
Defined in Data.FileStore.Types Methods fromByteString :: ByteString -> ByteString Source # toByteString :: ByteString -> ByteString Source # | |
| Contents String Source # | |
Defined in Data.FileStore.Types | |
Constructors
| TimeRange | |
Constructors
| MergeInfo | |
Fields
| |
data FileStoreError Source #
Constructors
| 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
| Exception FileStoreError Source # | |
Defined in Data.FileStore.Types Methods toException :: FileStoreError -> SomeException fromException :: SomeException -> Maybe FileStoreError displayException :: FileStoreError -> String backtraceDesired :: FileStoreError -> Bool | |
| Read FileStoreError Source # | |
Defined in Data.FileStore.Types Methods readsPrec :: Int -> ReadS FileStoreError readList :: ReadS [FileStoreError] readPrec :: ReadPrec FileStoreError readListPrec :: ReadPrec [FileStoreError] | |
| Show FileStoreError Source # | |
Defined in Data.FileStore.Types Methods showsPrec :: Int -> FileStoreError -> ShowS show :: FileStoreError -> String showList :: [FileStoreError] -> ShowS | |
| Eq FileStoreError Source # | |
Defined in Data.FileStore.Types Methods (==) :: FileStoreError -> FileStoreError -> Bool (/=) :: FileStoreError -> FileStoreError -> Bool | |
data SearchMatch Source #
Constructors
| SearchMatch | |
Fields
| |
Instances
| Read SearchMatch Source # | |
Defined in Data.FileStore.Types Methods readsPrec :: Int -> ReadS SearchMatch readList :: ReadS [SearchMatch] readPrec :: ReadPrec SearchMatch readListPrec :: ReadPrec [SearchMatch] | |
| Show SearchMatch Source # | |
Defined in Data.FileStore.Types Methods showsPrec :: Int -> SearchMatch -> ShowS show :: SearchMatch -> String showList :: [SearchMatch] -> ShowS | |
| Eq SearchMatch Source # | |
Defined in Data.FileStore.Types | |
data SearchQuery Source #
Constructors
| SearchQuery | |
Fields
| |
Instances
| Read SearchQuery Source # | |
Defined in Data.FileStore.Types Methods readsPrec :: Int -> ReadS SearchQuery readList :: ReadS [SearchQuery] readPrec :: ReadPrec SearchQuery readListPrec :: ReadPrec [SearchQuery] | |
| Show SearchQuery Source # | |
Defined in Data.FileStore.Types Methods showsPrec :: Int -> SearchQuery -> ShowS show :: SearchQuery -> String showList :: [SearchQuery] -> ShowS | |
| Eq SearchQuery Source # | |
Defined in Data.FileStore.Types | |
Instances
| NFData UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime | |
| Data UTCTime | |
Defined in Data.Time.Clock.Internal.UTCTime Methods 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 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 :: forall r r'. (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 | |
| Read UTCTime | |
Defined in Data.Time.Format.Parse | |
| Show UTCTime | |
| Eq UTCTime | |
| Ord UTCTime | |
| FormatTime UTCTime | |
Defined in Data.Time.Format.Format.Instances Methods formatCharacter :: Bool -> Char -> Maybe (FormatOptions -> UTCTime -> String) | |
| ISO8601 UTCTime | |
Defined in Data.Time.Format.ISO8601 Methods iso8601Format :: Format UTCTime | |
| ParseTime UTCTime | |
Defined in Data.Time.Format.Parse.Instances Methods substituteTimeSpecifier :: Proxy UTCTime -> TimeLocale -> Char -> Maybe String parseTimeSpecifier :: Proxy UTCTime -> TimeLocale -> Maybe ParseNumericPadding -> Char -> ReadP String buildTime :: TimeLocale -> [(Char, String)] -> Maybe UTCTime | |
A versioning filestore, which can be implemented using the file system, a database, or revision-control software.
Constructors
| FileStore | |
Fields
| |