Conflictor patches
- data RealPatch prim x y where
- Duplicate :: Non (RealPatch prim) x -> RealPatch prim x x
- Etacilpud :: Non (RealPatch prim) x -> RealPatch prim x x
- Normal :: prim x y -> RealPatch prim x y
- Conflictor :: [Non (RealPatch prim) x] -> FL prim x y -> Non (RealPatch prim) x -> RealPatch prim y x
- InvConflictor :: [Non (RealPatch prim) x] -> FL prim x y -> Non (RealPatch prim) x -> RealPatch prim x y
- prim2real :: prim x y -> RealPatch prim x y
- isConsistent :: PrimPatch prim => RealPatch prim x y -> Maybe Doc
- isForward :: PrimPatch prim => RealPatch prim s y -> Maybe Doc
- isDuplicate :: RealPatch prim s y -> Bool
- mergeUnravelled :: PrimPatch prim => [Sealed (FL prim x)] -> Maybe (FlippedSeal (RealPatch prim) x)
Documentation
data RealPatch prim x y whereSource
Duplicate x
: This patch has no effect since x
is already present in the repository
Etacilpud x: invert (Duplicate x)
Normal prim
: A primitive patch
Conflictor ix xx x
:
ix
is the set of patches:
- that conflict with
x
and also conflict with another patch in the repository - that conflict with a patch that conflict with
x
xx
is the sequence of patches that conflict *only* with x
x
is the current patch
ix
and x
are stored as Non
objects, which include any necessary
context to uniquely define the patch that is referred to.
InvConflictor ix xx x
: like invert (Conflictor ix xx x)
Duplicate :: Non (RealPatch prim) x -> RealPatch prim x x | |
Etacilpud :: Non (RealPatch prim) x -> RealPatch prim x x | |
Normal :: prim x y -> RealPatch prim x y | |
Conflictor :: [Non (RealPatch prim) x] -> FL prim x y -> Non (RealPatch prim) x -> RealPatch prim y x | |
InvConflictor :: [Non (RealPatch prim) x] -> FL prim x y -> Non (RealPatch prim) x -> RealPatch prim x y |
isConsistent :: PrimPatch prim => RealPatch prim x y -> Maybe DocSource
This is used for unit-testing and for internal sanity checks
isForward :: PrimPatch prim => RealPatch prim s y -> Maybe DocSource
This is only used for unit testing
isDuplicate :: RealPatch prim s y -> BoolSource
isDuplicate
p
is ' True
if p
is either a Duplicate
or Etacilpud
patch
mergeUnravelled :: PrimPatch prim => [Sealed (FL prim x)] -> Maybe (FlippedSeal (RealPatch prim) x)Source