Safe Haskell | None |
---|
- hashBundle :: (PatchListFormat p, ShowPatchBasic p) => FL (Named p) x y -> String
- makeBundle2 :: (ApplyState p ~ Tree, RepoPatch p) => Maybe (Tree IO) -> RL (PatchInfoAnd p) start x -> FL (Named p) x y -> FL (Named p) x y -> IO Doc
- makeBundleN :: (ApplyState p ~ Tree, RepoPatch p) => Maybe (Tree IO) -> PatchSet p start x -> FL (Named p) x y -> IO Doc
- scanBundle :: forall p. RepoPatch p => ByteString -> Either String (SealedPatchSet p Origin)
- contextPatches :: RepoPatch p => PatchSet p Origin x -> (PatchSet p :> RL (PatchInfoAnd p)) Origin x
- scanContext :: RepoPatch p => ByteString -> PatchSet p Origin x
- patchFilename :: String -> String
- getContext :: ByteString -> ([PatchInfo], ByteString)
- parseBundle :: forall p. RepoPatch p => ByteString -> Either String (Sealed ((PatchSet p :> FL (PatchInfoAnd p)) Origin))
Documentation
hashBundle :: (PatchListFormat p, ShowPatchBasic p) => FL (Named p) x y -> StringSource
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 p) start x -> FL (Named p) x y -> FL (Named p) x y -> IO DocSource
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 p start x -> FL (Named p) x y -> IO DocSource
scanBundle :: forall p. RepoPatch p => ByteString -> Either String (SealedPatchSet p Origin)Source
contextPatches :: RepoPatch p => PatchSet p Origin x -> (PatchSet p :> RL (PatchInfoAnd p)) Origin xSource
scanContext :: RepoPatch p => ByteString -> PatchSet p Origin xSource
patchFilename :: String -> StringSource
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.
parseBundle :: forall p. RepoPatch p => ByteString -> Either String (Sealed ((PatchSet p :> FL (PatchInfoAnd p)) Origin))Source