Safe Haskell | None |
---|---|
Language | Haskell2010 |
Darcs.Patch.V2.RepoPatch
Synopsis
- data RepoPatchV2 (prim :: Type -> Type -> Type) wX wY where
- Duplicate :: forall (prim :: Type -> Type -> Type) wX. Non (RepoPatchV2 prim) wX -> RepoPatchV2 prim wX wX
- Etacilpud :: forall (prim :: Type -> Type -> Type) wX. Non (RepoPatchV2 prim) wX -> RepoPatchV2 prim wX wX
- Normal :: forall (prim :: Type -> Type -> Type) wX wY. prim wX wY -> RepoPatchV2 prim wX wY
- Conflictor :: forall (prim :: Type -> Type -> Type) wY wX. [Non (RepoPatchV2 prim) wY] -> FL prim wY wX -> Non (RepoPatchV2 prim) wY -> RepoPatchV2 prim wX wY
- InvConflictor :: forall (prim :: Type -> Type -> Type) wX wY. [Non (RepoPatchV2 prim) wX] -> FL prim wX wY -> Non (RepoPatchV2 prim) wX -> RepoPatchV2 prim wX wY
- isConsistent :: forall (prim :: Type -> Type -> Type) wX wY. PrimPatch prim => RepoPatchV2 prim wX wY -> Maybe Doc
- isForward :: forall (prim :: Type -> Type -> Type) wS wY. PrimPatch prim => RepoPatchV2 prim wS wY -> Maybe Doc
- isDuplicate :: forall (prim :: Type -> Type -> Type) wS wY. RepoPatchV2 prim wS wY -> Bool
- mergeUnravelled :: forall (prim :: Type -> Type -> Type) wX. PrimPatch prim => [Sealed (FL prim wX)] -> Maybe (FlippedSeal (RepoPatchV2 prim) wX)
Documentation
data RepoPatchV2 (prim :: Type -> Type -> Type) wX wY where #
RepoPatchV2
is used to represents prim patches that are duplicates of, or
conflict with, another prim patch in the repository.
Normal prim
: A primitive patch
Duplicate x
: This patch has no effect since x
is already present in the
repository.
Etacilpud x: invert (Duplicate x)
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 original, conflicting patch.
ix
and x
are stored as Non
objects, which include any necessary
context to uniquely define the patch that is referred to.
The intuition is that a Conflictor should have the effect of inverting any
patches that x
conflicts with, that haven't already been undone by another
Conflictor in the repository.
Therefore, the effect of a Conflictor is invert xx
.
InvConflictor ix xx x
: like invert (Conflictor ix xx x)
Constructors
Duplicate :: forall (prim :: Type -> Type -> Type) wX. Non (RepoPatchV2 prim) wX -> RepoPatchV2 prim wX wX | |
Etacilpud :: forall (prim :: Type -> Type -> Type) wX. Non (RepoPatchV2 prim) wX -> RepoPatchV2 prim wX wX | |
Normal :: forall (prim :: Type -> Type -> Type) wX wY. prim wX wY -> RepoPatchV2 prim wX wY | |
Conflictor :: forall (prim :: Type -> Type -> Type) wY wX. [Non (RepoPatchV2 prim) wY] -> FL prim wY wX -> Non (RepoPatchV2 prim) wY -> RepoPatchV2 prim wX wY | |
InvConflictor :: forall (prim :: Type -> Type -> Type) wX wY. [Non (RepoPatchV2 prim) wX] -> FL prim wX wY -> Non (RepoPatchV2 prim) wX -> RepoPatchV2 prim wX wY |
Instances
isConsistent :: forall (prim :: Type -> Type -> Type) wX wY. PrimPatch prim => RepoPatchV2 prim wX wY -> Maybe Doc #
This is used for unit-testing and for internal sanity checks
isForward :: forall (prim :: Type -> Type -> Type) wS wY. PrimPatch prim => RepoPatchV2 prim wS wY -> Maybe Doc #
isForward
p
is True
if p
is either an InvConflictor
or
Etacilpud
.
isDuplicate :: forall (prim :: Type -> Type -> Type) wS wY. RepoPatchV2 prim wS wY -> Bool #
isDuplicate
p
is True
if p
is either a Duplicate
or Etacilpud
patch.
mergeUnravelled :: forall (prim :: Type -> Type -> Type) wX. PrimPatch prim => [Sealed (FL prim wX)] -> Maybe (FlippedSeal (RepoPatchV2 prim) wX) #
mergeUnravelled
is used when converting from Darcs V1 patches (Mergers)
to Darcs V2 patches (Conflictors).