miss-0: A Haskell git implimentation

Safe HaskellNone
LanguageHaskell2010

Data.Git.Internal.Pack

Description

Pack file support.

Synopsis

Documentation

data Raw Source #

Constructors

Raw 
Instances
Eq Raw Source # 
Instance details

Defined in Data.Git.Internal.Pack

Methods

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

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

Ord Raw Source # 
Instance details

Defined in Data.Git.Internal.Pack

Methods

compare :: Raw -> Raw -> Ordering #

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

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

(>) :: Raw -> Raw -> Bool #

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

max :: Raw -> Raw -> Raw #

min :: Raw -> Raw -> Raw #

Show Raw Source # 
Instance details

Defined in Data.Git.Internal.Pack

Methods

showsPrec :: Int -> Raw -> ShowS #

show :: Raw -> String #

showList :: [Raw] -> ShowS #

parseFanout :: Parser (Vector Word32) Source #

parseIndexShas :: Word32 -> Parser (Vector Sha1) Source #

parseShaCrcs :: Word32 -> Parser (Vector Crc32) Source #

parseShaOffsets :: Word32 -> Parser (Vector Word32) Source #

parseBigOffsets :: Vector Word32 -> Parser (Vector Word64) Source #

readPackFile :: RawFilePath -> IO PackFile Source #

Read a PackFile off the filesystem.

findPackSha :: PackFile -> Sha1 -> Maybe Object Source #

Try to get the Object for a Sha1 in a PackFile.

newtype PackingT m a Source #

A monad transformer for writing packfiles.

Constructors

PackingT 
Instances
MonadTrans PackingT Source # 
Instance details

Defined in Data.Git.Internal.Pack

Methods

lift :: Monad m => m a -> PackingT m a #

Monad m => Monad (PackingT m) Source # 
Instance details

Defined in Data.Git.Internal.Pack

Methods

(>>=) :: PackingT m a -> (a -> PackingT m b) -> PackingT m b #

(>>) :: PackingT m a -> PackingT m b -> PackingT m b #

return :: a -> PackingT m a #

fail :: String -> PackingT m a #

Functor m => Functor (PackingT m) Source # 
Instance details

Defined in Data.Git.Internal.Pack

Methods

fmap :: (a -> b) -> PackingT m a -> PackingT m b #

(<$) :: a -> PackingT m b -> PackingT m a #

MonadFail m => MonadFail (PackingT m) Source # 
Instance details

Defined in Data.Git.Internal.Pack

Methods

fail :: String -> PackingT m a #

Applicative m => Applicative (PackingT m) Source # 
Instance details

Defined in Data.Git.Internal.Pack

Methods

pure :: a -> PackingT m a #

(<*>) :: PackingT m (a -> b) -> PackingT m a -> PackingT m b #

liftA2 :: (a -> b -> c) -> PackingT m a -> PackingT m b -> PackingT m c #

(*>) :: PackingT m a -> PackingT m b -> PackingT m b #

(<*) :: PackingT m a -> PackingT m b -> PackingT m a #

MonadIO m => MonadIO (PackingT m) Source # 
Instance details

Defined in Data.Git.Internal.Pack

Methods

liftIO :: IO a -> PackingT m a #

(MonadGit m, MonadIO m) => MonadGit (PackingT m) Source #

Like the instance for GitT, but writing packfiles.

Instance details

Defined in Data.Git.Monad

Monad m => MonadReader (MVar PackingState) (PackingT m) Source # 
Instance details

Defined in Data.Git.Internal.Pack

runPackingT :: MonadIO m => (PackFile -> m ()) -> RawFilePath -> PackingT m a -> m a Source #

Run a PackingT computation, using the given path as a template for the tempfile. The pack and the index will be written to the same directory as the tempfile.

flushPackFile :: MonadIO m => (PackFile -> m ()) -> PackingT m () Source #

Write out the currently accumulating packfile, and start writing a new one.

packObject :: MonadIO m => Object -> PackingT m Sha1 Source #

Write an object to the packfile.

writePackFile :: MonadIO m => (PackFile -> m ()) -> RawFilePath -> [Object] -> m () Source #

Write the given objects to a packfile using the given path as a template for the tempfile. The pack will be written to the same directory as the tempfile. Also writes the pack index.