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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.V2

Synopsis

- data RepoPatchV2 (prim :: Type -> Type -> Type) wX wY

# Documentation

data RepoPatchV2 (prim :: Type -> Type -> Type) wX wY #

`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)`

#### Instances

Instances details

PrimPatch prim => Apply (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Associated Types
type ApplyState (RepoPatchV2 prim) |
Instance details Defined in Darcs.Patch.V2.RepoPatch type ApplyState (RepoPatchV2 prim) = ApplyState prim
Methods apply :: ApplyMonad (ApplyState (RepoPatchV2 prim)) m => RepoPatchV2 prim wX wY -> m () # unapply :: ApplyMonad (ApplyState (RepoPatchV2 prim)) m => RepoPatchV2 prim wX wY -> m () #
PrimPatch prim => Commute (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods commute :: (RepoPatchV2 prim :> RepoPatchV2 prim) wX wY -> Maybe ((RepoPatchV2 prim :> RepoPatchV2 prim) wX wY) #
PrimPatch prim => CommuteNoConflicts (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods commuteNoConflicts :: (RepoPatchV2 prim :> RepoPatchV2 prim) wX wY -> Maybe ((RepoPatchV2 prim :> RepoPatchV2 prim) wX wY) #
PrimPatch prim => Conflict (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods isConflicted :: RepoPatchV2 prim wX wY -> Bool # resolveConflicts :: RL (RepoPatchV2 prim) wO wX -> RL (RepoPatchV2 prim) wX wY -> [ConflictDetails (PrimOf (RepoPatchV2 prim)) wY] #
PatchDebug prim => PatchDebug (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods patchDebugDummy :: RepoPatchV2 prim wX wY -> () #
PrimPatch prim => Effect (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods effect :: RepoPatchV2 prim wX wY -> FL (PrimOf (RepoPatchV2 prim)) wX wY #
IsHunk prim => IsHunk (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods isHunk :: RepoPatchV2 prim wX wY -> Maybe (FileHunk (ObjectIdOfPatch (RepoPatchV2 prim)) wX wY) #
PatchListFormat (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods patchListFormat :: ListFormat (RepoPatchV2 prim) #
FromPrim (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods fromAnonymousPrim :: PrimOf (RepoPatchV2 prim) wX wY -> RepoPatchV2 prim wX wY # fromPrim :: PatchId (RepoPatchV2 prim) -> PrimOf (RepoPatchV2 prim) wX wY -> RepoPatchV2 prim wX wY # fromPrims :: PatchInfo -> FL (PrimOf (RepoPatchV2 prim)) wX wY -> FL (RepoPatchV2 prim) wX wY #
PrimPatch prim => PrimPatchBase (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Associated Types
type PrimOf (RepoPatchV2 prim) |
Instance details Defined in Darcs.Patch.V2.RepoPatch type PrimOf (RepoPatchV2 prim) = prim
ToPrim (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods toPrim :: RepoPatchV2 prim wX wY -> Maybe (PrimOf (RepoPatchV2 prim) wX wY) #
PatchInspect prim => PatchInspect (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods listTouchedFiles :: RepoPatchV2 prim wX wY -> [AnchoredPath] # hunkMatches :: (ByteString -> Bool) -> RepoPatchV2 prim wX wY -> Bool #
Invert prim => Invert (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods invert :: RepoPatchV2 prim wX wY -> RepoPatchV2 prim wY wX #
PrimPatch prim => CleanMerge (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods cleanMerge :: (RepoPatchV2 prim :\/: RepoPatchV2 prim) wX wY -> Maybe ((RepoPatchV2 prim :/\: RepoPatchV2 prim) wX wY) #
PrimPatch prim => Merge (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods merge :: (RepoPatchV2 prim :\/: RepoPatchV2 prim) wX wY -> (RepoPatchV2 prim :/\: RepoPatchV2 prim) wX wY #
PrimPatch prim => ReadPatch (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods readPatch' :: Parser (Sealed (RepoPatchV2 prim wX)) #
PrimPatch prim => Check (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods isInconsistent :: RepoPatchV2 prim wX wY -> Maybe Doc #
PrimPatch prim => RepairToFL (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods applyAndTryToFixFL :: ApplyMonad (ApplyState (RepoPatchV2 prim)) m => RepoPatchV2 prim wX wY -> m (Maybe (String, FL (RepoPatchV2 prim) wX wY)) #
PrimPatch prim => ShowContextPatch (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods showPatchWithContextAndApply :: ApplyMonad (ApplyState (RepoPatchV2 prim)) m => ShowPatchFor -> RepoPatchV2 prim wX wY -> m Doc #
PrimPatch prim => ShowPatch (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods content :: RepoPatchV2 prim wX wY -> Doc # description :: RepoPatchV2 prim wX wY -> Doc # summary :: RepoPatchV2 prim wX wY -> Doc # summaryFL :: FL (RepoPatchV2 prim) wX wY -> Doc # thing :: RepoPatchV2 prim wX wY -> String # things :: RepoPatchV2 prim wX wY -> String #
PrimPatch prim => ShowPatchBasic (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods showPatch :: ShowPatchFor -> RepoPatchV2 prim wX wY -> Doc #
Summary (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods conflictedEffect :: RepoPatchV2 prim wX wY -> [IsConflictedPrim (PrimOf (RepoPatchV2 prim))] #
PrimPatch prim => Unwind (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods fullUnwind :: RepoPatchV2 prim wX wY -> Unwound (PrimOf (RepoPatchV2 prim)) wX wY #
PrimPatch prim => Nonable (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods non :: RepoPatchV2 prim wX wY -> Non (RepoPatchV2 prim) wX #
PrimPatch prim => Eq2 (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods unsafeCompare :: RepoPatchV2 prim wA wB -> RepoPatchV2 prim wC wD -> Bool # (=\/=) :: RepoPatchV2 prim wA wB -> RepoPatchV2 prim wA wC -> EqCheck wB wC # (=/\=) :: RepoPatchV2 prim wA wC -> RepoPatchV2 prim wB wC -> EqCheck wA wB #
Show2 prim => Show2 (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods showDict2 :: ShowDict (RepoPatchV2 prim wX wY) #
Show2 prim => Show1 (RepoPatchV2 prim wX) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods showDict1 :: Dict (Show (RepoPatchV2 prim wX wX0)) #
Show2 prim => Show (RepoPatchV2 prim wX wY) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods showsPrec :: Int -> RepoPatchV2 prim wX wY -> ShowS # show :: RepoPatchV2 prim wX wY -> String # showList :: [RepoPatchV2 prim wX wY] -> ShowS #
type ApplyState (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch type ApplyState (RepoPatchV2 prim) = ApplyState prim
type PrimOf (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch type PrimOf (RepoPatchV2 prim) = prim
type PatchId (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch type PatchId (RepoPatchV2 prim) = ()