Safe Haskell | None |
---|---|
Language | Haskell2010 |
Darcs.Repository.Inventory
Synopsis
- module Darcs.Repository.Inventory.Format
- readPatchesFromInventoryFile :: forall (p :: Type -> Type -> Type) (rt :: AccessType) wU wR wS. (PatchListFormat p, ReadPatch p) => FilePath -> Repository rt p wU wR -> IO (PatchSet p Origin wS)
- readPatchesFromInventory :: forall (p :: Type -> Type -> Type). (PatchListFormat p, ReadPatch p) => Cache -> Inventory -> IO (SealedPatchSet p Origin)
- readSinglePatch :: forall (p :: Type -> Type -> Type) wX. ReadPatch p => Cache -> PatchInfo -> PatchHash -> IO (Sealed (p wX))
- readOneInventory :: forall (p :: Type -> Type -> Type) wX. ReadPatch p => Cache -> FilePath -> IO (Sealed (RL (PatchInfoAndG p) wX))
- writeInventory :: forall (p :: Type -> Type -> Type) wX. RepoPatch p => String -> Cache -> PatchSet p Origin wX -> IO InventoryHash
- writePatchIfNecessary :: forall (p :: Type -> Type -> Type) wX wY. RepoPatch p => Cache -> PatchInfoAnd p wX wY -> IO InventoryEntry
- writeHashFile :: ValidHash h => Cache -> Doc -> IO h
Documentation
readPatchesFromInventoryFile :: forall (p :: Type -> Type -> Type) (rt :: AccessType) wU wR wS. (PatchListFormat p, ReadPatch p) => FilePath -> Repository rt p wU wR -> IO (PatchSet p Origin wS) Source #
Read a PatchSet
starting with a specific inventory inside a Repository
.
readPatchesFromInventory :: forall (p :: Type -> Type -> Type). (PatchListFormat p, ReadPatch p) => Cache -> Inventory -> IO (SealedPatchSet p Origin) Source #
readSinglePatch :: forall (p :: Type -> Type -> Type) wX. ReadPatch p => Cache -> PatchInfo -> PatchHash -> IO (Sealed (p wX)) Source #
readOneInventory :: forall (p :: Type -> Type -> Type) wX. ReadPatch p => Cache -> FilePath -> IO (Sealed (RL (PatchInfoAndG p) wX)) Source #
writeInventory :: forall (p :: Type -> Type -> Type) wX. RepoPatch p => String -> Cache -> PatchSet p Origin wX -> IO InventoryHash Source #
writePatchIfNecessary :: forall (p :: Type -> Type -> Type) wX wY. RepoPatch p => Cache -> PatchInfoAnd p wX wY -> IO InventoryEntry Source #
Write a PatchInfoAnd
to disk and return an InventoryEntry
i.e. the
patch info and hash. However, if we patch already contains a hash, assume it
has already been written to disk at some point and merely return the info
and hash.
writeHashFile :: ValidHash h => Cache -> Doc -> IO h Source #
Wrapper around writeFileUsingCache
that takes a Doc
instead of a
ByteString
.