unison-codebase-sqlite-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

U.Codebase.Sqlite.Patch.Format

Synopsis

Documentation

data PatchLocalIds' t h d Source #

Instances

Instances details
(Show t, Show h, Show d) => Show (PatchLocalIds' t h d) Source # 
Instance details

Defined in U.Codebase.Sqlite.Patch.Format

Methods

showsPrec :: Int -> PatchLocalIds' t h d -> ShowS #

show :: PatchLocalIds' t h d -> String #

showList :: [PatchLocalIds' t h d] -> ShowS #

(Eq t, Eq h, Eq d) => Eq (PatchLocalIds' t h d) Source # 
Instance details

Defined in U.Codebase.Sqlite.Patch.Format

Methods

(==) :: PatchLocalIds' t h d -> PatchLocalIds' t h d -> Bool #

(/=) :: PatchLocalIds' t h d -> PatchLocalIds' t h d -> Bool #

type HashPatchLocalIds = PatchLocalIds' Text ComponentHash ComponentHash Source #

LocalIds type which can be used in hashing the Patch.

data SyncPatchFormat' parent text hash defn Source #

Constructors

SyncFull (PatchLocalIds' text hash defn) ByteString 
SyncDiff parent (PatchLocalIds' text hash defn) ByteString

p is the identity of the thing that the diff is relative to

Instances

Instances details
(Show text, Show hash, Show defn, Show parent) => Show (SyncPatchFormat' parent text hash defn) Source # 
Instance details

Defined in U.Codebase.Sqlite.Patch.Format

Methods

showsPrec :: Int -> SyncPatchFormat' parent text hash defn -> ShowS #

show :: SyncPatchFormat' parent text hash defn -> String #

showList :: [SyncPatchFormat' parent text hash defn] -> ShowS #

(Eq text, Eq hash, Eq defn, Eq parent) => Eq (SyncPatchFormat' parent text hash defn) Source # 
Instance details

Defined in U.Codebase.Sqlite.Patch.Format

Methods

(==) :: SyncPatchFormat' parent text hash defn -> SyncPatchFormat' parent text hash defn -> Bool #

(/=) :: SyncPatchFormat' parent text hash defn -> SyncPatchFormat' parent text hash defn -> Bool #

applyPatchDiffs :: Patch -> [PatchDiff] -> Patch Source #

Apply a list of patch diffs to a patch, left to right.

localPatchToPatch :: PatchLocalIds -> LocalPatch -> Patch Source #

Type specialized version of localToPatch'.

localPatchToPatch' :: (Ord t, Ord h, Ord d) => PatchLocalIds' t h d -> Patch' LocalTextId LocalHashId LocalDefnId -> Patch' t h d Source #

Generic version of localPatchToPatch that works with any PatchLocalIds'.