darcs-2.10.1: a distributed, interactive, smart revision control system

Safe HaskellNone
LanguageHaskell2010

Darcs.Patch.V2.Real

Synopsis

Documentation

data RealPatch prim wX wY where Source

RealPatch 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 :: Non (RealPatch prim) wX -> RealPatch prim wX wX 
Etacilpud :: Non (RealPatch prim) wX -> RealPatch prim wX wX 
Normal :: prim wX wY -> RealPatch prim wX wY 
Conflictor :: [Non (RealPatch prim) wX] -> FL prim wX wY -> Non (RealPatch prim) wX -> RealPatch prim wY wX 
InvConflictor :: [Non (RealPatch prim) wX] -> FL prim wX wY -> Non (RealPatch prim) wX -> RealPatch prim wX wY 

Instances

Show2 prim => Show2 (RealPatch prim) 
PrimPatch prim => MyEq (RealPatch prim) 
PatchListFormat (RealPatch prim) 
PatchInspect prim => PatchInspect (RealPatch prim) 
PatchDebug prim => PatchDebug (RealPatch prim) 
MaybeInternal (RealPatch prim) 
NameHack (RealPatch prim) 
PrimPatch prim => ReadPatch (RealPatch prim) 
Invert prim => Invert (RealPatch prim) 
PrimPatch prim => Commute (RealPatch prim) 
PrimPatch prim => Merge (RealPatch prim) 
PrimPatch prim => Apply (RealPatch prim) 
PrimPatch prim => RepairToFL (RealPatch prim) 
PrimPatch prim => Check (RealPatch prim) 
PrimPatch prim => ShowPatch (RealPatch prim) 
PrimPatch prim => ShowPatchBasic (RealPatch prim) 
PrimPatch prim => Patchy (RealPatch prim) 
PrimPatch prim => Matchable (RealPatch prim) 
IsHunk prim => IsHunk (RealPatch prim) 
ToFromPrim (RealPatch prim) 
FromPrim (RealPatch prim) 
PrimPatch prim => PrimPatchBase (RealPatch prim) 
PrimPatch prim => Effect (RealPatch prim) 
PrimPatch prim => CommuteNoConflicts (RealPatch prim) 
PrimPatch prim => Conflict (RealPatch prim) 
PrimPatch prim => Nonable (RealPatch prim) 
RecontextRebase (RealPatch prim) 
PrimPatch prim => RepoPatch (RealPatch prim) 
Show2 prim => Show1 (RealPatch prim wX) 
Show2 prim => Show (RealPatch prim wX wY) 
type ApplyState (RealPatch prim) = ApplyState prim 
type PrimOf (RealPatch prim) = prim 

prim2real :: prim wX wY -> RealPatch prim wX wY Source

isConsistent :: PrimPatch prim => RealPatch prim wX wY -> Maybe Doc Source

This is used for unit-testing and for internal sanity checks

isForward :: PrimPatch prim => RealPatch prim wS wY -> Maybe Doc Source

isForward p is True if p is either an InvConflictor or Etacilpud.

isDuplicate :: RealPatch prim wS wY -> Bool Source

isDuplicate p is True if p is either a Duplicate or Etacilpud patch.

mergeUnravelled :: PrimPatch prim => [Sealed (FL prim wX)] -> Maybe (FlippedSeal (RealPatch prim) wX) Source

mergeUnravelled is used when converting from Darcs V1 patches (Mergers) to Darcs V2 patches (Conflictors).