Safe Haskell | None |
---|---|
Language | Haskell2010 |
- hashBundle :: (PatchListFormat p, ShowPatchBasic p) => FL (WrappedNamed rt p) wX wY -> String
- makeBundle2 :: (ApplyState p ~ Tree, RepoPatch p) => Maybe (Tree IO) -> RL (PatchInfoAnd rt p) wStart wX -> FL (WrappedNamed rt p) wX wY -> FL (WrappedNamed rt p) wX wY -> IO Doc
- makeBundleN :: (ApplyState p ~ Tree, RepoPatch p) => Maybe (Tree IO) -> PatchSet rt p wStart wX -> FL (WrappedNamed rt p) wX wY -> IO Doc
- scanBundle :: forall rt p. RepoPatch p => ByteString -> Either String (SealedPatchSet rt p Origin)
- contextPatches :: RepoPatch p => PatchSet rt p Origin wX -> (PatchSet rt p :> RL (PatchInfoAnd rt p)) Origin wX
- scanContextFile :: RepoPatch p => FilePath -> IO (PatchSet rt p Origin wX)
- patchFilename :: String -> String
- getContext :: ByteString -> ([PatchInfo], ByteString)
- minContext :: RepoPatch p => PatchSet rt p wStart wB -> FL (PatchInfoAnd rt p) wB wC -> Sealed ((PatchSet rt p :> FL (PatchInfoAnd rt p)) wStart)
- parseBundle :: forall rt p. RepoPatch p => ByteString -> Either String (Sealed ((PatchSet rt p :> FL (PatchInfoAnd rt p)) Origin))
Documentation
hashBundle :: (PatchListFormat p, ShowPatchBasic p) => FL (WrappedNamed rt p) wX wY -> String Source #
hashBundle creates a SHA1 string of a given a FL of named patches. This allows us to ensure that the patches in a received patchBundle have not been modified in transit.
makeBundle2 :: (ApplyState p ~ Tree, RepoPatch p) => Maybe (Tree IO) -> RL (PatchInfoAnd rt p) wStart wX -> FL (WrappedNamed rt p) wX wY -> FL (WrappedNamed rt p) wX wY -> IO Doc Source #
In makeBundle2, it is presumed that the two patch sequences are identical, but that they may be lazily generated. If two different patch sequences are passed, a bundle with a mismatched hash will be generated, which is not the end of the world, but isn't very useful either.
makeBundleN :: (ApplyState p ~ Tree, RepoPatch p) => Maybe (Tree IO) -> PatchSet rt p wStart wX -> FL (WrappedNamed rt p) wX wY -> IO Doc Source #
scanBundle :: forall rt p. RepoPatch p => ByteString -> Either String (SealedPatchSet rt p Origin) Source #
contextPatches :: RepoPatch p => PatchSet rt p Origin wX -> (PatchSet rt p :> RL (PatchInfoAnd rt p)) Origin wX Source #
scanContextFile :: RepoPatch p => FilePath -> IO (PatchSet rt p Origin wX) Source #
scanContextFile
scans the context in the file of the given name.
patchFilename :: String -> String Source #
patchFilename maps a patch description string to a safe (lowercased, spaces removed and ascii-only characters) patch filename.
getContext :: ByteString -> ([PatchInfo], ByteString) Source #
getContext parses a context list, returning a tuple containing the list, and remaining ByteString input.
minContext :: RepoPatch p => PatchSet rt p wStart wB -> FL (PatchInfoAnd rt p) wB wC -> Sealed ((PatchSet rt p :> FL (PatchInfoAnd rt p)) wStart) Source #
Minimize the context of a bundle to be sent, taking into account the patches selected to be sent
parseBundle :: forall rt p. RepoPatch p => ByteString -> Either String (Sealed ((PatchSet rt p :> FL (PatchInfoAnd rt p)) Origin)) Source #