bytepatch-0.2.1: Patch byte-representable data in a bytestream.
Safe HaskellNone
LanguageHaskell2010

BytePatch.Linear.Gen

Synopsis

Documentation

gen :: [Patch 'AbsSeek Bytes] -> ([Patch 'FwdSeek Bytes], [Error 'AbsSeek Bytes]) Source #

Process a list of patches into a linear patch script.

Errors are reported, but do not interrupt patch generation. The user could discard patchscripts that errored, or perhaps attempt to recover them. This is what we do for errors:

  • overlapping edit: later edit is skipped & overlapping edits reported

data Error s a Source #

Error encountered during linear patchscript generation.

Constructors

ErrorOverlap (Patch s a) (Patch s a)

Two edits wrote to the same offset.

Instances

Instances details
(Eq (SeekRep s), Eq a) => Eq (Error s a) Source # 
Instance details

Defined in BytePatch.Linear.Gen

Methods

(==) :: Error s a -> Error s a -> Bool

(/=) :: Error s a -> Error s a -> Bool

(Show (SeekRep s), Show a) => Show (Error s a) Source # 
Instance details

Defined in BytePatch.Linear.Gen

Methods

showsPrec :: Int -> Error s a -> ShowS

show :: Error s a -> String

showList :: [Error s a] -> ShowS