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

BytePatch

Documentation

data MultiPatch s a Source #

Constructors

MultiPatch 

Fields

Instances

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

Defined in BytePatch

Methods

(==) :: MultiPatch s a -> MultiPatch s a -> Bool #

(/=) :: MultiPatch s a -> MultiPatch s a -> Bool #

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

Defined in BytePatch

Methods

showsPrec :: Int -> MultiPatch s a -> ShowS #

show :: MultiPatch s a -> String #

showList :: [MultiPatch s a] -> ShowS #

Generic (MultiPatch s a) Source # 
Instance details

Defined in BytePatch

Associated Types

type Rep (MultiPatch s a) :: Type -> Type #

Methods

from :: MultiPatch s a -> Rep (MultiPatch s a) x #

to :: Rep (MultiPatch s a) x -> MultiPatch s a #

(ToJSON (SeekRep s), ToJSON a) => ToJSON (MultiPatch s a) Source # 
Instance details

Defined in BytePatch

(FromJSON (SeekRep s), FromJSON a) => FromJSON (MultiPatch s a) Source # 
Instance details

Defined in BytePatch

type Rep (MultiPatch s a) Source # 
Instance details

Defined in BytePatch

type Rep (MultiPatch s a) = D1 ('MetaData "MultiPatch" "BytePatch" "bytepatch-0.3.0-inplace" 'False) (C1 ('MetaCons "MultiPatch" 'PrefixI 'True) (S1 ('MetaSel ('Just "mpData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "mpAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Seek s a])))

data Seek s a Source #

Instances

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

Defined in BytePatch

Methods

(==) :: Seek s a -> Seek s a -> Bool #

(/=) :: Seek s a -> Seek s a -> Bool #

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

Defined in BytePatch

Methods

showsPrec :: Int -> Seek s a -> ShowS #

show :: Seek s a -> String #

showList :: [Seek s a] -> ShowS #

Generic (Seek s a) Source # 
Instance details

Defined in BytePatch

Associated Types

type Rep (Seek s a) :: Type -> Type #

Methods

from :: Seek s a -> Rep (Seek s a) x #

to :: Rep (Seek s a) x -> Seek s a #

(ToJSON (SeekRep s), ToJSON a) => ToJSON (Seek s a) Source # 
Instance details

Defined in BytePatch

Methods

toJSON :: Seek s a -> Value #

toEncoding :: Seek s a -> Encoding #

toJSONList :: [Seek s a] -> Value #

toEncodingList :: [Seek s a] -> Encoding #

(FromJSON (SeekRep s), FromJSON a) => FromJSON (Seek s a) Source # 
Instance details

Defined in BytePatch

Methods

parseJSON :: Value -> Parser (Seek s a) #

parseJSONList :: Value -> Parser [Seek s a] #

type Rep (Seek s a) Source # 
Instance details

Defined in BytePatch

data Aligned p Source #

Constructors

Aligned 

Instances

Instances details
Eq p => Eq (Aligned p) Source # 
Instance details

Defined in BytePatch

Methods

(==) :: Aligned p -> Aligned p -> Bool #

(/=) :: Aligned p -> Aligned p -> Bool #

Show p => Show (Aligned p) Source # 
Instance details

Defined in BytePatch

Methods

showsPrec :: Int -> Aligned p -> ShowS #

show :: Aligned p -> String #

showList :: [Aligned p] -> ShowS #

Generic (Aligned p) Source # 
Instance details

Defined in BytePatch

Associated Types

type Rep (Aligned p) :: Type -> Type #

Methods

from :: Aligned p -> Rep (Aligned p) x #

to :: Rep (Aligned p) x -> Aligned p #

ToJSON p => ToJSON (Aligned p) Source # 
Instance details

Defined in BytePatch

FromJSON p => FromJSON (Aligned p) Source # 
Instance details

Defined in BytePatch

type Rep (Aligned p) Source # 
Instance details

Defined in BytePatch

type Rep (Aligned p) = D1 ('MetaData "Aligned" "BytePatch" "bytepatch-0.3.0-inplace" 'False) (C1 ('MetaCons "Aligned" 'PrefixI 'True) (S1 ('MetaSel ('Just "alignedAlign") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SeekRep 'RelSeek)) :*: S1 ('MetaSel ('Just "alignedPatches") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [p])))

convert :: (Seek s a -> Rec (Flap a) fs) -> MultiPatch s a -> [Patch s fs a] Source #

convertBin :: forall s a. MultiPatch s a -> [Patch s '[Const Meta, MetaStream] a] Source #

convertAlign :: forall s a. SeekRep s ~ Natural => MultiPatch 'RelSeek a -> [Patch 'RelSeek '[Const (Meta s)] a] Source #

convertEmpty :: forall s a. MultiPatch s a -> [Patch s '[] a] Source #

align :: forall s a ss rs is i r. (SeekRep s ~ Natural, r ~ Const (Meta s), rs ~ RDelete r ss, RElem r ss i, RSubset rs ss is) => Aligned (Patch 'RelSeek ss a) -> Either (Error s) [Patch s rs a] Source #

cmBin :: Seek s a -> Rec (Flap a) '[Const Meta] Source #

cmAlign :: SeekRep s ~ Natural => Seek 'RelSeek a -> Rec (Flap a) '[Const (Meta s)] Source #

cm :: f a -> Rec (Flap a) '[f] Source #