restless-git-0.6: Easy Git repository serialization

Safe HaskellNone
LanguageHaskell2010

Restless.Git

Description

This module defines a simple way to serialize state as a nested file hierarchy saved in a Git repository.

Synopsis

Documentation

data Path Source #

A fact path is something like "/0123...abc/storage/0x1". It has some number of directories and a file name.

Constructors

Path [ByteString] ByteString 

Instances

Eq Path Source # 

Methods

(==) :: Path -> Path -> Bool #

(/=) :: Path -> Path -> Bool #

Ord Path Source # 

Methods

compare :: Path -> Path -> Ordering #

(<) :: Path -> Path -> Bool #

(<=) :: Path -> Path -> Bool #

(>) :: Path -> Path -> Bool #

(>=) :: Path -> Path -> Bool #

max :: Path -> Path -> Path #

min :: Path -> Path -> Path #

Show Path Source # 

Methods

showsPrec :: Int -> Path -> ShowS #

show :: Path -> String #

showList :: [Path] -> ShowS #

data File Source #

A file is a serialized value with a path.

Constructors

File 

Instances

Eq File Source # 

Methods

(==) :: File -> File -> Bool #

(/=) :: File -> File -> Bool #

Ord File Source # 

Methods

compare :: File -> File -> Ordering #

(<) :: File -> File -> Bool #

(<=) :: File -> File -> Bool #

(>) :: File -> File -> Bool #

(>=) :: File -> File -> Bool #

max :: File -> File -> File #

min :: File -> File -> File #

Show File Source # 

Methods

showsPrec :: Int -> File -> ShowS #

show :: File -> String #

showList :: [File] -> ShowS #

make :: (Monad m, MonadIO m) => FilePath -> m () Source #

Initialize an empty repository at the given path.

save :: (Monad m, MonadIO m) => FilePath -> Text -> Set File -> m () Source #

Save a set of files to an initialized repository and commit this tree to the master branch with a given commit message.

load :: (Monad m, MonadIO m) => FilePath -> m (Set File) Source #

Load a set of files from a repository's master branch.