darcs-2.18.3: a distributed, interactive, smart revision control system
Safe HaskellSafe-Inferred
LanguageHaskell2010

Darcs.Patch.RepoPatch

Synopsis

Documentation

type AnnotateRP p = (Annotate (PrimOf p), Invert (PrimOf p), Effect p) Source #

This constraint expresses what is needed for a repo patch to support the high-level interface to annotation (currently annotateFile and annotateDirectory)

class Apply p where Source #

Minimal complete definition

apply

Associated Types

type ApplyState p :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState p) m => p wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState p) m => p wX wY -> m () Source #

default unapply :: (ApplyMonad (ApplyState p) m, Invert p) => p wX wY -> m () Source #

Instances

Instances details
Apply Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Apply

Associated Types

type ApplyState Prim :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m () Source #

Apply Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.V1.Apply

Associated Types

type ApplyState Prim :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m () Source #

Apply Prim Source # 
Instance details

Defined in Darcs.Patch.V1.Prim

Associated Types

type ApplyState Prim :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m () Source #

Apply Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

Associated Types

type ApplyState Prim :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m () Source #

Apply p => Apply (Invertible p) Source # 
Instance details

Defined in Darcs.Patch.Invertible

Associated Types

type ApplyState (Invertible p) :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState (Invertible p)) m => Invertible p wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState (Invertible p)) m => Invertible p wX wY -> m () Source #

Apply p => Apply (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Associated Types

type ApplyState (Named p) :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState (Named p)) m => Named p wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState (Named p)) m => Named p wX wY -> m () Source #

Apply p => Apply (PatchInfoAndG p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Associated Types

type ApplyState (PatchInfoAndG p) :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState (PatchInfoAndG p)) m => PatchInfoAndG p wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState (PatchInfoAndG p)) m => PatchInfoAndG p wX wY -> m () Source #

Apply prim => Apply (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

Associated Types

type ApplyState (RebaseChange prim) :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState (RebaseChange prim)) m => RebaseChange prim wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState (RebaseChange prim)) m => RebaseChange prim wX wY -> m () Source #

Apply prim => Apply (RebaseFixup prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Fixup

Associated Types

type ApplyState (RebaseFixup prim) :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState (RebaseFixup prim)) m => RebaseFixup prim wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState (RebaseFixup prim)) m => RebaseFixup prim wX wY -> m () Source #

PrimPatch prim => Apply (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Apply

Associated Types

type ApplyState (RepoPatchV1 prim) :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState (RepoPatchV1 prim)) m => RepoPatchV1 prim wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState (RepoPatchV1 prim)) m => RepoPatchV1 prim wX wY -> m () Source #

PrimPatch prim => Apply (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Associated Types

type ApplyState (RepoPatchV2 prim) :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState (RepoPatchV2 prim)) m => RepoPatchV2 prim wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState (RepoPatchV2 prim)) m => RepoPatchV2 prim wX wY -> m () Source #

Apply p => Apply (FL p) Source # 
Instance details

Defined in Darcs.Patch.Apply

Associated Types

type ApplyState (FL p) :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState (FL p)) m => FL p wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState (FL p)) m => FL p wX wY -> m () Source #

Apply p => Apply (RL p) Source # 
Instance details

Defined in Darcs.Patch.Apply

Associated Types

type ApplyState (RL p) :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState (RL p)) m => RL p wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState (RL p)) m => RL p wX wY -> m () Source #

Apply p => Apply (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

Associated Types

type ApplyState (PrimWithName name p) :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState (PrimWithName name p)) m => PrimWithName name p wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState (PrimWithName name p)) m => PrimWithName name p wX wY -> m () Source #

PrimPatch prim => Apply (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Associated Types

type ApplyState (RepoPatchV3 name prim) :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState (RepoPatchV3 name prim)) m => RepoPatchV3 name prim wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState (RepoPatchV3 name prim)) m => RepoPatchV3 name prim wX wY -> m () Source #

Apply p => Apply (PatchSeq p) Source # 
Instance details

Defined in Darcs.UI.Commands.Test.Impl

Associated Types

type ApplyState (PatchSeq p) :: (Type -> Type) -> Type Source #

Methods

apply :: ApplyMonad (ApplyState (PatchSeq p)) m => PatchSeq p wX wY -> m () Source #

unapply :: ApplyMonad (ApplyState (PatchSeq p)) m => PatchSeq p wX wY -> m () Source #

class Check p where Source #

Minimal complete definition

Nothing

Methods

isInconsistent :: p wX wY -> Maybe Doc Source #

Instances

Instances details
Check p => Check (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Methods

isInconsistent :: Named p wX wY -> Maybe Doc Source #

Check (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Core

Methods

isInconsistent :: RepoPatchV1 prim wX wY -> Maybe Doc Source #

PrimPatch prim => Check (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

isInconsistent :: RepoPatchV2 prim wX wY -> Maybe Doc Source #

Check p => Check (FL p) Source # 
Instance details

Defined in Darcs.Patch.Repair

Methods

isInconsistent :: FL p wX wY -> Maybe Doc Source #

Check p => Check (RL p) Source # 
Instance details

Defined in Darcs.Patch.Repair

Methods

isInconsistent :: RL p wX wY -> Maybe Doc Source #

PrimPatch prim => Check (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

isInconsistent :: RepoPatchV3 name prim wX wY -> Maybe Doc Source #

class Commute p where Source #

Class of patches that that can be commuted.

Instances should obey the following laws:

commute-symmetry
commute (p:>q) == Just (q':>p') <=> commute (q':>p') == Just (p':>q)
invert-commute

If patches are invertible, then

commute (p:>q) == Just (q':>p') <=> commute (invert q:>invert p) == Just (invert p':>invert q')

The more general law

square-commute
commute (p:>q) == Just (q':>p') => commute (invert p:>q') == Just (q:>invert p')

is valid in general only provided we know (a priori) that commute (invert p:>q') succeeds, in other words, that p and q are not in conflict with each other. See Darcs.Patch.CommuteNoConflicts for an extended discussion.

Methods

commute :: (p :> p) wX wY -> Maybe ((p :> p) wX wY) Source #

Instances

Instances details
Commute Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Commute

Methods

commute :: (Prim :> Prim) wX wY -> Maybe ((Prim :> Prim) wX wY) Source #

Commute Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.V1.Commute

Methods

commute :: (Prim :> Prim) wX wY -> Maybe ((Prim :> Prim) wX wY) Source #

Commute RebaseName Source # 
Instance details

Defined in Darcs.Patch.Rebase.Name

Commute Prim Source # 
Instance details

Defined in Darcs.Patch.V1.Prim

Methods

commute :: (Prim :> Prim) wX wY -> Maybe ((Prim :> Prim) wX wY) Source #

Commute Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

Methods

commute :: (Prim :> Prim) wX wY -> Maybe ((Prim :> Prim) wX wY) Source #

Commute p => Commute (LabelledPatch p) Source # 
Instance details

Defined in Darcs.Patch.Choices

Commute p => Commute (Invertible p) Source # 
Instance details

Defined in Darcs.Patch.Invertible

Methods

commute :: (Invertible p :> Invertible p) wX wY -> Maybe ((Invertible p :> Invertible p) wX wY) Source #

Commute p => Commute (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Methods

commute :: (Named p :> Named p) wX wY -> Maybe ((Named p :> Named p) wX wY) Source #

(PatchId p ~ PatchInfo, Commute p) => Commute (PatchInfoAndG p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Commute prim => Commute (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

Methods

commute :: (RebaseChange prim :> RebaseChange prim) wX wY -> Maybe ((RebaseChange prim :> RebaseChange prim) wX wY) Source #

Commute prim => Commute (RebaseFixup prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Fixup

Methods

commute :: (RebaseFixup prim :> RebaseFixup prim) wX wY -> Maybe ((RebaseFixup prim :> RebaseFixup prim) wX wY) Source #

PrimPatch prim => Commute (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Commute

Methods

commute :: (RepoPatchV1 prim :> RepoPatchV1 prim) wX wY -> Maybe ((RepoPatchV1 prim :> RepoPatchV1 prim) wX wY) Source #

PrimPatch prim => Commute (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

commute :: (RepoPatchV2 prim :> RepoPatchV2 prim) wX wY -> Maybe ((RepoPatchV2 prim :> RepoPatchV2 prim) wX wY) Source #

Commute p => Commute (FL p) Source # 
Instance details

Defined in Darcs.Patch.Commute

Methods

commute :: (FL p :> FL p) wX wY -> Maybe ((FL p :> FL p) wX wY) Source #

Commute p => Commute (RL p) Source # 
Instance details

Defined in Darcs.Patch.Commute

Methods

commute :: (RL p :> RL p) wX wY -> Maybe ((RL p :> RL p) wX wY) Source #

(SignedId name, Commute p) => Commute (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

Methods

commute :: (PrimWithName name p :> PrimWithName name p) wX wY -> Maybe ((PrimWithName name p :> PrimWithName name p) wX wY) Source #

(SignedId name, StorableId name, PrimPatch prim) => Commute (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

commute :: (RepoPatchV3 name prim :> RepoPatchV3 name prim) wX wY -> Maybe ((RepoPatchV3 name prim :> RepoPatchV3 name prim) wX wY) Source #

class Conflict p where Source #

Methods

isConflicted :: p wX wY -> Bool Source #

resolveConflicts :: RL p wO wX -> RL p wX wY -> [ConflictDetails (PrimOf p) wY] Source #

The first parameter is a context containing all patches preceding the ones for which we want to calculate the conflict resolution, which is the second parameter. Each element of the result list represents the resolution of one maximal set of transitively conflicting alternatives, in other words, a connected subset of the conflict graph. But the elements themselves must not conflict with each other, guaranteeing that they can be cleanly merged into a single FL of prims.

Instances

Instances details
(Commute p, Conflict p, Summary p, PrimPatchBase p, PatchListFormat p, ShowPatch p) => Conflict (Named p) Source #

This instance takes care of handling the interaction between conflict resolution and explicit dependencies. A conflict involves a set of two or more patches and the general rule is that the conflict is considered resolved if there is another (later) patch that (transitively) depends on each of the (mutually) conflicting patches.

This principle extends to explicit dependencies between Named patches. In particular, recording a tag has the effect of resolving any as yet unresolved conflicts in a repo.

In general a Named patch contains multiple changes ( a "changeset"). Consider the named patches

  Named A [] a
  Named B [] (b1;b2)
  Named C [] c
  Named D [A,B] _

where, at the RepoPatch level, a conflicts with b1, and c with b2. D depends explicitly on both A and B, so it fully covers the conflict between a and b1 and thus we would be justified to consider that particular conflict as resolved. Unfortunately we cannot detect this at the Named patch level because RepoPatchV1 and V2 have no notion of patch identities. Thus, at the Named level the two underlying conflicts appear as a single large conflict between the three named patches A, B, and C, and this means that patch D does not count as a (partial) resolution (even though it arguably should).

When we decide that a set of conflicting Named patches is resolved, we move the RepoPatches contained in them to the context of the resolution. For all other named patches, we must commute as much of their contents as possible past the ones marked as resolved, using commutation at the RepoPatch level (i.e. ignoring explicit dependencies).

Instance details

Defined in Darcs.Patch.Named

Methods

isConflicted :: Named p wX wY -> Bool Source #

resolveConflicts :: RL (Named p) wO wX -> RL (Named p) wX wY -> [ConflictDetails (PrimOf (Named p)) wY] Source #

(Commute p, Conflict p, Summary p, PrimPatchBase p, PatchListFormat p, ShowPatch p) => Conflict (PatchInfoAnd p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

PrimPatch prim => Conflict (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Commute

Methods

isConflicted :: RepoPatchV1 prim wX wY -> Bool Source #

resolveConflicts :: RL (RepoPatchV1 prim) wO wX -> RL (RepoPatchV1 prim) wX wY -> [ConflictDetails (PrimOf (RepoPatchV1 prim)) wY] Source #

PrimPatch prim => Conflict (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

isConflicted :: RepoPatchV2 prim wX wY -> Bool Source #

resolveConflicts :: RL (RepoPatchV2 prim) wO wX -> RL (RepoPatchV2 prim) wX wY -> [ConflictDetails (PrimOf (RepoPatchV2 prim)) wY] Source #

(SignedId name, StorableId name, PrimPatch prim) => Conflict (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Resolution

Methods

isConflicted :: RepoPatchV3 name prim wX wY -> Bool Source #

resolveConflicts :: RL (RepoPatchV3 name prim) wO wX -> RL (RepoPatchV3 name prim) wX wY -> [ConflictDetails (PrimOf (RepoPatchV3 name prim)) wY] Source #

class Effect p where Source #

Patches whose concrete effect can be expressed as a list of primitive patches.

A minimal definition would be either of effect or effectRL.

Methods

effect :: p wX wY -> FL (PrimOf p) wX wY Source #

Instances

Instances details
Effect p => Effect (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Methods

effect :: Named p wX wY -> FL (PrimOf (Named p)) wX wY Source #

Effect p => Effect (PatchInfoAndG p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

effect :: PatchInfoAndG p wX wY -> FL (PrimOf (PatchInfoAndG p)) wX wY Source #

Effect p => Effect (WithDroppedDeps p) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

Methods

effect :: WithDroppedDeps p wX wY -> FL (PrimOf (WithDroppedDeps p)) wX wY Source #

PrimPatch prim => Effect (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Commute

Methods

effect :: RepoPatchV1 prim wX wY -> FL (PrimOf (RepoPatchV1 prim)) wX wY Source #

PrimPatch prim => Effect (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

effect :: RepoPatchV2 prim wX wY -> FL (PrimOf (RepoPatchV2 prim)) wX wY Source #

Effect p => Effect (FL p) Source # 
Instance details

Defined in Darcs.Patch.Effect

Methods

effect :: FL p wX wY -> FL (PrimOf (FL p)) wX wY Source #

Effect p => Effect (RL p) Source # 
Instance details

Defined in Darcs.Patch.Effect

Methods

effect :: RL p wX wY -> FL (PrimOf (RL p)) wX wY Source #

Effect (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

effect :: RepoPatchV3 name prim wX wY -> FL (PrimOf (RepoPatchV3 name prim)) wX wY Source #

class Eq2 p where Source #

An witness aware equality class. A minimal definition defines any one of unsafeCompare, =\/= and =/\=.

Minimal complete definition

unsafeCompare | (=\/=) | (=/\=)

Methods

unsafeCompare :: p wA wB -> p wC wD -> Bool Source #

It is unsafe to define a class instance via this method, because if it returns True then the default implementations of =\/= and =/\= will coerce the equality of two witnesses.

Calling this method is safe, although =\/= or =/\= would be better choices as it is not usually meaningul to compare two patches that don't share either a starting or an ending context

(=\/=) :: p wA wB -> p wA wC -> EqCheck wB wC infix 4 Source #

Compare two things with the same starting witness. If the things compare equal, evidence of the ending witnesses being equal will be returned.

(=/\=) :: p wA wC -> p wB wC -> EqCheck wA wB infix 4 Source #

Compare two things with the same ending witness. If the things compare equal, evidence of the starting witnesses being equal will be returned.

Instances

Instances details
Eq2 Hunk Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Core

Methods

unsafeCompare :: Hunk wA wB -> Hunk wC wD -> Bool Source #

(=\/=) :: Hunk wA wB -> Hunk wA wC -> EqCheck wB wC Source #

(=/\=) :: Hunk wA wC -> Hunk wB wC -> EqCheck wA wB Source #

Eq2 HunkMove Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Core

Methods

unsafeCompare :: HunkMove wA wB -> HunkMove wC wD -> Bool Source #

(=\/=) :: HunkMove wA wB -> HunkMove wA wC -> EqCheck wB wC Source #

(=/\=) :: HunkMove wA wC -> HunkMove wB wC -> EqCheck wA wB Source #

Eq2 Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Core

Methods

unsafeCompare :: Prim wA wB -> Prim wC wD -> Bool Source #

(=\/=) :: Prim wA wB -> Prim wA wC -> EqCheck wB wC Source #

(=/\=) :: Prim wA wC -> Prim wB wC -> EqCheck wA wB Source #

Eq2 DirPatchType Source # 
Instance details

Defined in Darcs.Patch.Prim.V1.Core

Methods

unsafeCompare :: DirPatchType wA wB -> DirPatchType wC wD -> Bool Source #

(=\/=) :: DirPatchType wA wB -> DirPatchType wA wC -> EqCheck wB wC Source #

(=/\=) :: DirPatchType wA wC -> DirPatchType wB wC -> EqCheck wA wB Source #

Eq2 FilePatchType Source # 
Instance details

Defined in Darcs.Patch.Prim.V1.Core

Methods

unsafeCompare :: FilePatchType wA wB -> FilePatchType wC wD -> Bool Source #

(=\/=) :: FilePatchType wA wB -> FilePatchType wA wC -> EqCheck wB wC Source #

(=/\=) :: FilePatchType wA wC -> FilePatchType wB wC -> EqCheck wA wB Source #

Eq2 Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.V1.Core

Methods

unsafeCompare :: Prim wA wB -> Prim wC wD -> Bool Source #

(=\/=) :: Prim wA wB -> Prim wA wC -> EqCheck wB wC Source #

(=/\=) :: Prim wA wC -> Prim wB wC -> EqCheck wA wB Source #

Eq2 RebaseName Source # 
Instance details

Defined in Darcs.Patch.Rebase.Name

Methods

unsafeCompare :: RebaseName wA wB -> RebaseName wC wD -> Bool Source #

(=\/=) :: RebaseName wA wB -> RebaseName wA wC -> EqCheck wB wC Source #

(=/\=) :: RebaseName wA wC -> RebaseName wB wC -> EqCheck wA wB Source #

Eq2 Prim Source # 
Instance details

Defined in Darcs.Patch.V1.Prim

Methods

unsafeCompare :: Prim wA wB -> Prim wC wD -> Bool Source #

(=\/=) :: Prim wA wB -> Prim wA wC -> EqCheck wB wC Source #

(=/\=) :: Prim wA wC -> Prim wB wC -> EqCheck wA wB Source #

Eq2 Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

Methods

unsafeCompare :: Prim wA wB -> Prim wC wD -> Bool Source #

(=\/=) :: Prim wA wB -> Prim wA wC -> EqCheck wB wC Source #

(=/\=) :: Prim wA wC -> Prim wB wC -> EqCheck wA wB Source #

Eq2 p => Eq2 (Invertible p) Source # 
Instance details

Defined in Darcs.Patch.Invertible

Methods

unsafeCompare :: Invertible p wA wB -> Invertible p wC wD -> Bool Source #

(=\/=) :: Invertible p wA wB -> Invertible p wA wC -> EqCheck wB wC Source #

(=/\=) :: Invertible p wA wC -> Invertible p wB wC -> EqCheck wA wB Source #

(Commute p, Eq2 p) => Eq2 (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Methods

unsafeCompare :: Named p wA wB -> Named p wC wD -> Bool Source #

(=\/=) :: Named p wA wB -> Named p wA wC -> EqCheck wB wC Source #

(=/\=) :: Named p wA wC -> Named p wB wC -> EqCheck wA wB Source #

Eq2 p => Eq2 (Hopefully p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

unsafeCompare :: Hopefully p wA wB -> Hopefully p wC wD -> Bool Source #

(=\/=) :: Hopefully p wA wB -> Hopefully p wA wC -> EqCheck wB wC Source #

(=/\=) :: Hopefully p wA wC -> Hopefully p wB wC -> EqCheck wA wB Source #

Eq2 p => Eq2 (PatchInfoAndG p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

unsafeCompare :: PatchInfoAndG p wA wB -> PatchInfoAndG p wC wD -> Bool Source #

(=\/=) :: PatchInfoAndG p wA wB -> PatchInfoAndG p wA wC -> EqCheck wB wC Source #

(=/\=) :: PatchInfoAndG p wA wC -> PatchInfoAndG p wB wC -> EqCheck wA wB Source #

Eq2 prim => Eq2 (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Commute

Methods

unsafeCompare :: RepoPatchV1 prim wA wB -> RepoPatchV1 prim wC wD -> Bool Source #

(=\/=) :: RepoPatchV1 prim wA wB -> RepoPatchV1 prim wA wC -> EqCheck wB wC Source #

(=/\=) :: RepoPatchV1 prim wA wC -> RepoPatchV1 prim wB wC -> EqCheck wA wB Source #

PrimPatch prim => Eq2 (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

unsafeCompare :: RepoPatchV2 prim wA wB -> RepoPatchV2 prim wC wD -> Bool Source #

(=\/=) :: RepoPatchV2 prim wA wB -> RepoPatchV2 prim wA wC -> EqCheck wB wC Source #

(=/\=) :: RepoPatchV2 prim wA wC -> RepoPatchV2 prim wB wC -> EqCheck wA wB Source #

Eq2 p => Eq2 (FL p) Source # 
Instance details

Defined in Darcs.Patch.Witnesses.Ordered

Methods

unsafeCompare :: FL p wA wB -> FL p wC wD -> Bool Source #

(=\/=) :: FL p wA wB -> FL p wA wC -> EqCheck wB wC Source #

(=/\=) :: FL p wA wC -> FL p wB wC -> EqCheck wA wB Source #

Eq2 p => Eq2 (RL p) Source # 
Instance details

Defined in Darcs.Patch.Witnesses.Ordered

Methods

unsafeCompare :: RL p wA wB -> RL p wC wD -> Bool Source #

(=\/=) :: RL p wA wB -> RL p wA wC -> EqCheck wB wC Source #

(=/\=) :: RL p wA wC -> RL p wB wC -> EqCheck wA wB Source #

(Eq name, Eq2 p) => Eq2 (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

Methods

unsafeCompare :: PrimWithName name p wA wB -> PrimWithName name p wC wD -> Bool Source #

(=\/=) :: PrimWithName name p wA wB -> PrimWithName name p wA wC -> EqCheck wB wC Source #

(=/\=) :: PrimWithName name p wA wC -> PrimWithName name p wB wC -> EqCheck wA wB Source #

(SignedId name, Eq2 prim, Commute prim) => Eq2 (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

unsafeCompare :: RepoPatchV3 name prim wA wB -> RepoPatchV3 name prim wC wD -> Bool Source #

(=\/=) :: RepoPatchV3 name prim wA wB -> RepoPatchV3 name prim wA wC -> EqCheck wB wC Source #

(=/\=) :: RepoPatchV3 name prim wA wC -> RepoPatchV3 name prim wB wC -> EqCheck wA wB Source #

(Eq2 a, Eq2 b) => Eq2 (a :> b) Source # 
Instance details

Defined in Darcs.Patch.Witnesses.Ordered

Methods

unsafeCompare :: (a :> b) wA wB -> (a :> b) wC wD -> Bool Source #

(=\/=) :: (a :> b) wA wB -> (a :> b) wA wC -> EqCheck wB wC Source #

(=/\=) :: (a :> b) wA wC -> (a :> b) wB wC -> EqCheck wA wB Source #

class FromPrim p where Source #

Minimal complete definition

fromAnonymousPrim

Methods

fromAnonymousPrim :: PrimOf p wX wY -> p wX wY Source #

fromPrim :: PatchId p -> PrimOf p wX wY -> p wX wY Source #

default fromPrim :: PatchId p ~ () => PatchId p -> PrimOf p wX wY -> p wX wY Source #

fromPrims :: PatchInfo -> FL (PrimOf p) wX wY -> FL p wX wY Source #

default fromPrims :: PatchId p ~ () => PatchInfo -> FL (PrimOf p) wX wY -> FL p wX wY Source #

Instances

Instances details
FromPrim (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Core

Methods

fromAnonymousPrim :: PrimOf (RepoPatchV1 prim) wX wY -> RepoPatchV1 prim wX wY Source #

fromPrim :: PatchId (RepoPatchV1 prim) -> PrimOf (RepoPatchV1 prim) wX wY -> RepoPatchV1 prim wX wY Source #

fromPrims :: PatchInfo -> FL (PrimOf (RepoPatchV1 prim)) wX wY -> FL (RepoPatchV1 prim) wX wY Source #

FromPrim (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

fromAnonymousPrim :: PrimOf (RepoPatchV2 prim) wX wY -> RepoPatchV2 prim wX wY Source #

fromPrim :: PatchId (RepoPatchV2 prim) -> PrimOf (RepoPatchV2 prim) wX wY -> RepoPatchV2 prim wX wY Source #

fromPrims :: PatchInfo -> FL (PrimOf (RepoPatchV2 prim)) wX wY -> FL (RepoPatchV2 prim) wX wY Source #

FromPrim (RepoPatchV3 prim) Source # 
Instance details

Defined in Darcs.Patch.V3

Methods

fromAnonymousPrim :: PrimOf (RepoPatchV3 prim) wX wY -> RepoPatchV3 prim wX wY Source #

fromPrim :: PatchId (RepoPatchV3 prim) -> PrimOf (RepoPatchV3 prim) wX wY -> RepoPatchV3 prim wX wY Source #

fromPrims :: PatchInfo -> FL (PrimOf (RepoPatchV3 prim)) wX wY -> FL (RepoPatchV3 prim) wX wY Source #

class IsHunk p where Source #

Methods

isHunk :: p wX wY -> Maybe (FileHunk (ObjectIdOfPatch p) wX wY) Source #

Instances

Instances details
IsHunk Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Core

Methods

isHunk :: Prim wX wY -> Maybe (FileHunk (ObjectIdOfPatch Prim) wX wY) Source #

ObjectIdOf (ApplyState Prim) ~ AnchoredPath => IsHunk Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.V1.Core

Methods

isHunk :: Prim wX wY -> Maybe (FileHunk (ObjectIdOfPatch Prim) wX wY) Source #

IsHunk Prim Source # 
Instance details

Defined in Darcs.Patch.V1.Prim

Methods

isHunk :: Prim wX wY -> Maybe (FileHunk (ObjectIdOfPatch Prim) wX wY) Source #

IsHunk Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

Methods

isHunk :: Prim wX wY -> Maybe (FileHunk (ObjectIdOfPatch Prim) wX wY) Source #

IsHunk (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Methods

isHunk :: Named p wX wY -> Maybe (FileHunk (ObjectIdOfPatch (Named p)) wX wY) Source #

IsHunk (PatchInfoAndG p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

IsHunk (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

Methods

isHunk :: RebaseChange prim wX wY -> Maybe (FileHunk (ObjectIdOfPatch (RebaseChange prim)) wX wY) Source #

(PrimPatch prim, ApplyState prim ~ ApplyState (RepoPatchV1 prim)) => IsHunk (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Commute

Methods

isHunk :: RepoPatchV1 prim wX wY -> Maybe (FileHunk (ObjectIdOfPatch (RepoPatchV1 prim)) wX wY) Source #

IsHunk prim => IsHunk (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

isHunk :: RepoPatchV2 prim wX wY -> Maybe (FileHunk (ObjectIdOfPatch (RepoPatchV2 prim)) wX wY) Source #

IsHunk p => IsHunk (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

Methods

isHunk :: PrimWithName name p wX wY -> Maybe (FileHunk (ObjectIdOfPatch (PrimWithName name p)) wX wY) Source #

IsHunk prim => IsHunk (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

isHunk :: RepoPatchV3 name prim wX wY -> Maybe (FileHunk (ObjectIdOfPatch (RepoPatchV3 name prim)) wX wY) Source #

class CleanMerge p => Merge p where Source #

Patches that can always be merged, even if they conflict.

Instances should obey the following laws:

symmetry
merge (p :\/: q) == q' :/\: p' <=> merge (q :\/: p) == p' :/\: q'
merge-commute
merge (p :\/: q) == q' :/\: p' ==> commute (p :> q') == Just (q :> p')

that is, the two branches of a merge commute to each other.

extension
cleanMerge (p :\/: q) == Just (q' :/\: p') => merge (p :\/: q) == q' :/\: p'

that is, merge is an extension of cleanMerge.

Methods

merge :: (p :\/: p) wX wY -> (p :/\: p) wX wY Source #

Instances

Instances details
Merge p => Merge (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Methods

merge :: (Named p :\/: Named p) wX wY -> (Named p :/\: Named p) wX wY Source #

(PatchId p ~ PatchInfo, Merge p) => Merge (PatchInfoAndG p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

PrimPatch prim => Merge (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Commute

Methods

merge :: (RepoPatchV1 prim :\/: RepoPatchV1 prim) wX wY -> (RepoPatchV1 prim :/\: RepoPatchV1 prim) wX wY Source #

PrimPatch prim => Merge (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

merge :: (RepoPatchV2 prim :\/: RepoPatchV2 prim) wX wY -> (RepoPatchV2 prim :/\: RepoPatchV2 prim) wX wY Source #

Merge p => Merge (FL p) Source # 
Instance details

Defined in Darcs.Patch.Merge

Methods

merge :: (FL p :\/: FL p) wX wY -> (FL p :/\: FL p) wX wY Source #

(SignedId name, StorableId name, PrimPatch prim) => Merge (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

merge :: (RepoPatchV3 name prim :\/: RepoPatchV3 name prim) wX wY -> (RepoPatchV3 name prim :/\: RepoPatchV3 name prim) wX wY Source #

class PatchInspect p where Source #

Methods

listTouchedFiles :: p wX wY -> [AnchoredPath] Source #

hunkMatches :: (ByteString -> Bool) -> p wX wY -> Bool Source #

Instances

Instances details
PatchInspect Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Core

PatchInspect Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.V1.Core

PatchInspect RebaseName Source # 
Instance details

Defined in Darcs.Patch.Rebase.Name

PatchInspect Prim Source # 
Instance details

Defined in Darcs.Patch.V1.Prim

PatchInspect Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

PatchInspect p => PatchInspect (LabelledPatch p) Source # 
Instance details

Defined in Darcs.Patch.Choices

PatchInspect p => PatchInspect (Invertible p) Source # 
Instance details

Defined in Darcs.Patch.Invertible

PatchInspect p => PatchInspect (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Methods

listTouchedFiles :: Named p wX wY -> [AnchoredPath] Source #

hunkMatches :: (ByteString -> Bool) -> Named p wX wY -> Bool Source #

PatchInspect p => PatchInspect (PatchInfoAndG p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

PatchInspect prim => PatchInspect (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

PatchInspect prim => PatchInspect (RebaseFixup prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Fixup

PrimPatch prim => PatchInspect (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Commute

PatchInspect prim => PatchInspect (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

PatchInspect p => PatchInspect (FL p) Source # 
Instance details

Defined in Darcs.Patch.Inspect

Methods

listTouchedFiles :: FL p wX wY -> [AnchoredPath] Source #

hunkMatches :: (ByteString -> Bool) -> FL p wX wY -> Bool Source #

PatchInspect p => PatchInspect (RL p) Source # 
Instance details

Defined in Darcs.Patch.Inspect

Methods

listTouchedFiles :: RL p wX wY -> [AnchoredPath] Source #

hunkMatches :: (ByteString -> Bool) -> RL p wX wY -> Bool Source #

PatchInspect p => PatchInspect (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

Methods

listTouchedFiles :: PrimWithName name p wX wY -> [AnchoredPath] Source #

hunkMatches :: (ByteString -> Bool) -> PrimWithName name p wX wY -> Bool Source #

PatchInspect prim => PatchInspect (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

listTouchedFiles :: RepoPatchV3 name prim wX wY -> [AnchoredPath] Source #

hunkMatches :: (ByteString -> Bool) -> RepoPatchV3 name prim wX wY -> Bool Source #

PatchInspect p => PatchInspect (PatchSeq p) Source # 
Instance details

Defined in Darcs.UI.Commands.Test.Impl

class PatchListFormat p where Source #

Showing and reading lists of patches. This class allows us to control how lists of patches are formatted on disk. For legacy reasons V1 patches have their own special treatment (see ListFormat). Other patch types use the default format which just puts them in a sequence without separators or any prelude/epilogue.

This means that 'FL (FL p)' etc would be ambiguous, so there are no instances for 'FL p' or other list types.

Minimal complete definition

Nothing

Instances

Instances details
PatchListFormat Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Show

PatchListFormat Prim Source # 
Instance details

Defined in Darcs.Patch.V1.Prim

PatchListFormat Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

PatchListFormat (Bracketed p) Source # 
Instance details

Defined in Darcs.Patch.Bracketed

PatchListFormat p => PatchListFormat (Invertible p) Source # 
Instance details

Defined in Darcs.Patch.Invertible

PatchListFormat (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

PatchListFormat (PatchInfoAndG p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

PatchListFormat (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

PatchListFormat (RebaseFixup prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Fixup

PatchListFormat (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Core

PatchListFormat (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

PatchListFormat (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

PatchListFormat (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

class PrimPatch (PrimOf p) => PrimPatchBase p Source #

Associated Types

type PrimOf (p :: * -> * -> *) :: * -> * -> * Source #

Instances

Instances details
PrimPatchBase p => PrimPatchBase (Invertible p) Source # 
Instance details

Defined in Darcs.Patch.Invertible

Associated Types

type PrimOf (Invertible p) :: Type -> Type -> Type Source #

PrimPatchBase p => PrimPatchBase (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Associated Types

type PrimOf (Named p) :: Type -> Type -> Type Source #

PrimPatchBase p => PrimPatchBase (PatchInfoAndG p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Associated Types

type PrimOf (PatchInfoAndG p) :: Type -> Type -> Type Source #

PrimPatch prim => PrimPatchBase (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

Associated Types

type PrimOf (RebaseChange prim) :: Type -> Type -> Type Source #

PrimPatchBase p => PrimPatchBase (WithDroppedDeps p) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

Associated Types

type PrimOf (WithDroppedDeps p) :: Type -> Type -> Type Source #

PrimPatch prim => PrimPatchBase (RebaseFixup prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Fixup

Associated Types

type PrimOf (RebaseFixup prim) :: Type -> Type -> Type Source #

PrimPatch prim => PrimPatchBase (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Core

Associated Types

type PrimOf (RepoPatchV1 prim) :: Type -> Type -> Type Source #

PrimPatch prim => PrimPatchBase (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Associated Types

type PrimOf (RepoPatchV2 prim) :: Type -> Type -> Type Source #

PrimPatchBase p => PrimPatchBase (FL p) Source # 
Instance details

Defined in Darcs.Patch.FromPrim

Associated Types

type PrimOf (FL p) :: Type -> Type -> Type Source #

PrimPatchBase p => PrimPatchBase (RL p) Source # 
Instance details

Defined in Darcs.Patch.FromPrim

Associated Types

type PrimOf (RL p) :: Type -> Type -> Type Source #

PrimPatch prim => PrimPatchBase (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Associated Types

type PrimOf (RepoPatchV3 name prim) :: Type -> Type -> Type Source #

class ReadPatch p where Source #

This class is used to decode patches from their binary representation.

Methods

readPatch' :: Parser (Sealed (p wX)) Source #

Instances

Instances details
ReadPatch Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Read

Methods

readPatch' :: Parser (Sealed (Prim wX)) Source #

ReadPatch RebaseName Source # 
Instance details

Defined in Darcs.Patch.Rebase.Name

ReadPatch Prim Source # 
Instance details

Defined in Darcs.Patch.V1.Prim

Methods

readPatch' :: Parser (Sealed (Prim wX)) Source #

ReadPatch Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

Methods

readPatch' :: Parser (Sealed (Prim wX)) Source #

ReadPatch p => ReadPatch (Bracketed p) Source # 
Instance details

Defined in Darcs.Patch.Read

(ReadPatch p, PatchListFormat p) => ReadPatch (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Methods

readPatch' :: Parser (Sealed (Named p wX)) Source #

(ReadPatch p, Ident p, PatchId p ~ PatchInfo) => ReadPatch (PatchInfoAndG p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

(ReadPatch prim, PatchListFormat prim) => ReadPatch (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

ReadPatch prim => ReadPatch (RebaseFixup prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Fixup

Methods

readPatch' :: Parser (Sealed (RebaseFixup prim wX)) Source #

(PrimPatchBase p, PatchListFormat p, ReadPatch p) => ReadPatch (RebaseItem p) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Legacy.Item

RepoPatch p => ReadPatch (WrappedNamed p) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Legacy.Wrapped

PrimPatch prim => ReadPatch (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Read

Methods

readPatch' :: Parser (Sealed (RepoPatchV1 prim wX)) Source #

PrimPatch prim => ReadPatch (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

readPatch' :: Parser (Sealed (RepoPatchV2 prim wX)) Source #

(ReadPatch p, PatchListFormat p) => ReadPatch (FL p) Source # 
Instance details

Defined in Darcs.Patch.Read

Methods

readPatch' :: Parser (Sealed (FL p wX)) Source #

(ReadPatch p, PatchListFormat p) => ReadPatch (RL p) Source # 
Instance details

Defined in Darcs.Patch.Read

Methods

readPatch' :: Parser (Sealed (RL p wX)) Source #

(StorableId name, ReadPatch p) => ReadPatch (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

Methods

readPatch' :: Parser (Sealed (PrimWithName name p wX)) Source #

(SignedId name, StorableId name, PrimPatch prim) => ReadPatch (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

readPatch' :: Parser (Sealed (RepoPatchV3 name prim wX)) Source #

class Apply p => RepairToFL p where Source #

RepairToFL is implemented by single patches that can be repaired (Prim, Patch, RepoPatchV2) There is a default so that patch types with no current legacy problems don't need to have an implementation.

Minimal complete definition

Nothing

Methods

applyAndTryToFixFL :: ApplyMonad (ApplyState p) m => p wX wY -> m (Maybe (String, FL p wX wY)) Source #

Instances

Instances details
RepairToFL Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Apply

Methods

applyAndTryToFixFL :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m (Maybe (String, FL Prim wX wY)) Source #

RepairToFL Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.V1.Apply

Methods

applyAndTryToFixFL :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m (Maybe (String, FL Prim wX wY)) Source #

RepairToFL Prim Source # 
Instance details

Defined in Darcs.Patch.V1.Prim

Methods

applyAndTryToFixFL :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m (Maybe (String, FL Prim wX wY)) Source #

RepairToFL Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

Methods

applyAndTryToFixFL :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m (Maybe (String, FL Prim wX wY)) Source #

PrimPatch prim => RepairToFL (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Apply

Methods

applyAndTryToFixFL :: ApplyMonad (ApplyState (RepoPatchV1 prim)) m => RepoPatchV1 prim wX wY -> m (Maybe (String, FL (RepoPatchV1 prim) wX wY)) Source #

PrimPatch prim => RepairToFL (RepoPatchV2 prim) Source # 
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)) Source #

Apply p => RepairToFL (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

Methods

applyAndTryToFixFL :: ApplyMonad (ApplyState (PrimWithName name p)) m => PrimWithName name p wX wY -> m (Maybe (String, FL (PrimWithName name p) wX wY)) Source #

PrimPatch prim => RepairToFL (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

applyAndTryToFixFL :: ApplyMonad (ApplyState (RepoPatchV3 name prim)) m => RepoPatchV3 name prim wX wY -> m (Maybe (String, FL (RepoPatchV3 name prim) wX wY)) Source #

class ShowPatchBasic p => ShowContextPatch p where Source #

Methods

showPatchWithContextAndApply :: ApplyMonad (ApplyState p) m => ShowPatchFor -> p wX wY -> m Doc Source #

Show a patch with context lines added, as diff -u does. Thus, it differs from showPatch only for hunks. It is used for instance before putting it into a bundle. As this unified context is not included in patch representation, this requires access to the ApplyState.

Note that this applies the patch in the ApplyMonad given by the context. This is done in order to simplify showing multiple patches in a series, since each patch may change the context lines for later changes.

For a version that does not apply the patch see showPatchWithContext.

Instances

Instances details
Apply Prim => ShowContextPatch Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Show

ShowContextPatch Prim Source # 
Instance details

Defined in Darcs.Patch.V1.Prim

ShowContextPatch Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

ShowContextPatch p => ShowContextPatch (Invertible p) Source # 
Instance details

Defined in Darcs.Patch.Invertible

(Apply p, IsHunk p, PatchListFormat p, ObjectId (ObjectIdOfPatch p), ShowContextPatch p) => ShowContextPatch (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

ShowContextPatch p => ShowContextPatch (PatchInfoAndG p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

PrimPatch prim => ShowContextPatch (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

PrimPatch prim => ShowContextPatch (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Viewing

PrimPatch prim => ShowContextPatch (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

(Apply p, IsHunk p, PatchListFormat p, ShowContextPatch p, ObjectId (ObjectIdOfPatch p)) => ShowContextPatch (FL p) Source # 
Instance details

Defined in Darcs.Patch.Viewing

(ShowContextPatch p, Apply p, IsHunk p, PatchListFormat p, ObjectId (ObjectIdOfPatch p)) => ShowContextPatch (RL p) Source # 
Instance details

Defined in Darcs.Patch.Viewing

(StorableId name, ShowContextPatch p) => ShowContextPatch (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

(SignedId name, StorableId name, PrimPatch prim) => ShowContextPatch (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

class ShowPatchBasic p => ShowPatch p where Source #

This class is used only for user interaction, not for storage. The default implementations for description and content are suitable only for PrimPatch and RepoPatch types. Logically, description should default to mempty while content should default to displayPatch. We define them the other way around so that showFriendly gives reasonable results for all patch types.

Minimal complete definition

summary

Methods

content :: p wX wY -> Doc Source #

description :: p wX wY -> Doc Source #

summary :: p wX wY -> Doc Source #

summaryFL :: FL p wX wY -> Doc Source #

thing :: p wX wY -> String Source #

things :: p wX wY -> String Source #

Instances

Instances details
ShowPatch Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Show

Methods

content :: Prim wX wY -> Doc Source #

description :: Prim wX wY -> Doc Source #

summary :: Prim wX wY -> Doc Source #

summaryFL :: FL Prim wX wY -> Doc Source #

thing :: Prim wX wY -> String Source #

things :: Prim wX wY -> String Source #

ShowPatch RebaseName Source # 
Instance details

Defined in Darcs.Patch.Rebase.Name

ShowPatch Prim Source # 
Instance details

Defined in Darcs.Patch.V1.Prim

Methods

content :: Prim wX wY -> Doc Source #

description :: Prim wX wY -> Doc Source #

summary :: Prim wX wY -> Doc Source #

summaryFL :: FL Prim wX wY -> Doc Source #

thing :: Prim wX wY -> String Source #

things :: Prim wX wY -> String Source #

ShowPatch Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

Methods

content :: Prim wX wY -> Doc Source #

description :: Prim wX wY -> Doc Source #

summary :: Prim wX wY -> Doc Source #

summaryFL :: FL Prim wX wY -> Doc Source #

thing :: Prim wX wY -> String Source #

things :: Prim wX wY -> String Source #

ShowPatch p => ShowPatch (Invertible p) Source # 
Instance details

Defined in Darcs.Patch.Invertible

Methods

content :: Invertible p wX wY -> Doc Source #

description :: Invertible p wX wY -> Doc Source #

summary :: Invertible p wX wY -> Doc Source #

summaryFL :: FL (Invertible p) wX wY -> Doc Source #

thing :: Invertible p wX wY -> String Source #

things :: Invertible p wX wY -> String Source #

(Summary p, PatchListFormat p, PrimPatchBase p, ShowPatch p) => ShowPatch (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Methods

content :: Named p wX wY -> Doc Source #

description :: Named p wX wY -> Doc Source #

summary :: Named p wX wY -> Doc Source #

summaryFL :: FL (Named p) wX wY -> Doc Source #

thing :: Named p wX wY -> String Source #

things :: Named p wX wY -> String Source #

(Summary p, PatchListFormat p, ShowPatch p) => ShowPatch (PatchInfoAndG p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

PrimPatch prim => ShowPatch (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

Methods

content :: RebaseChange prim wX wY -> Doc Source #

description :: RebaseChange prim wX wY -> Doc Source #

summary :: RebaseChange prim wX wY -> Doc Source #

summaryFL :: FL (RebaseChange prim) wX wY -> Doc Source #

thing :: RebaseChange prim wX wY -> String Source #

things :: RebaseChange prim wX wY -> String Source #

PrimPatch prim => ShowPatch (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Viewing

Methods

content :: RepoPatchV1 prim wX wY -> Doc Source #

description :: RepoPatchV1 prim wX wY -> Doc Source #

summary :: RepoPatchV1 prim wX wY -> Doc Source #

summaryFL :: FL (RepoPatchV1 prim) wX wY -> Doc Source #

thing :: RepoPatchV1 prim wX wY -> String Source #

things :: RepoPatchV1 prim wX wY -> String Source #

PrimPatch prim => ShowPatch (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

content :: RepoPatchV2 prim wX wY -> Doc Source #

description :: RepoPatchV2 prim wX wY -> Doc Source #

summary :: RepoPatchV2 prim wX wY -> Doc Source #

summaryFL :: FL (RepoPatchV2 prim) wX wY -> Doc Source #

thing :: RepoPatchV2 prim wX wY -> String Source #

things :: RepoPatchV2 prim wX wY -> String Source #

(PatchListFormat p, ShowPatch p) => ShowPatch (FL p) Source # 
Instance details

Defined in Darcs.Patch.Viewing

Methods

content :: FL p wX wY -> Doc Source #

description :: FL p wX wY -> Doc Source #

summary :: FL p wX wY -> Doc Source #

summaryFL :: FL (FL p) wX wY -> Doc Source #

thing :: FL p wX wY -> String Source #

things :: FL p wX wY -> String Source #

(PatchListFormat p, ShowPatch p) => ShowPatch (RL p) Source # 
Instance details

Defined in Darcs.Patch.Viewing

Methods

content :: RL p wX wY -> Doc Source #

description :: RL p wX wY -> Doc Source #

summary :: RL p wX wY -> Doc Source #

summaryFL :: FL (RL p) wX wY -> Doc Source #

thing :: RL p wX wY -> String Source #

things :: RL p wX wY -> String Source #

(StorableId name, PrimDetails p, ShowPatchBasic p) => ShowPatch (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

Methods

content :: PrimWithName name p wX wY -> Doc Source #

description :: PrimWithName name p wX wY -> Doc Source #

summary :: PrimWithName name p wX wY -> Doc Source #

summaryFL :: FL (PrimWithName name p) wX wY -> Doc Source #

thing :: PrimWithName name p wX wY -> String Source #

things :: PrimWithName name p wX wY -> String Source #

(SignedId name, StorableId name, PrimPatch prim) => ShowPatch (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

content :: RepoPatchV3 name prim wX wY -> Doc Source #

description :: RepoPatchV3 name prim wX wY -> Doc Source #

summary :: RepoPatchV3 name prim wX wY -> Doc Source #

summaryFL :: FL (RepoPatchV3 name prim) wX wY -> Doc Source #

thing :: RepoPatchV3 name prim wX wY -> String Source #

things :: RepoPatchV3 name prim wX wY -> String Source #

class ShowPatchBasic p where Source #

Methods

showPatch :: ShowPatchFor -> p wX wY -> Doc Source #

Instances

Instances details
ShowPatchBasic Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Show

Methods

showPatch :: ShowPatchFor -> Prim wX wY -> Doc Source #

ShowPatchBasic RebaseName Source # 
Instance details

Defined in Darcs.Patch.Rebase.Name

ShowPatchBasic Prim Source # 
Instance details

Defined in Darcs.Patch.V1.Prim

Methods

showPatch :: ShowPatchFor -> Prim wX wY -> Doc Source #

ShowPatchBasic Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

Methods

showPatch :: ShowPatchFor -> Prim wX wY -> Doc Source #

ShowPatchBasic p => ShowPatchBasic (Bracketed p) Source # 
Instance details

Defined in Darcs.Patch.Bracketed

Methods

showPatch :: ShowPatchFor -> Bracketed p wX wY -> Doc Source #

ShowPatchBasic p => ShowPatchBasic (Invertible p) Source # 
Instance details

Defined in Darcs.Patch.Invertible

Methods

showPatch :: ShowPatchFor -> Invertible p wX wY -> Doc Source #

(PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Methods

showPatch :: ShowPatchFor -> Named p wX wY -> Doc Source #

ShowPatchBasic p => ShowPatchBasic (PatchInfoAndG p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

PrimPatch prim => ShowPatchBasic (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

Methods

showPatch :: ShowPatchFor -> RebaseChange prim wX wY -> Doc Source #

ShowPatchBasic prim => ShowPatchBasic (RebaseFixup prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Fixup

Methods

showPatch :: ShowPatchFor -> RebaseFixup prim wX wY -> Doc Source #

(PatchListFormat prim, ShowPatchBasic prim) => ShowPatchBasic (Unwound prim) Source # 
Instance details

Defined in Darcs.Patch.Unwind

Methods

showPatch :: ShowPatchFor -> Unwound prim wX wY -> Doc Source #

ShowPatchBasic prim => ShowPatchBasic (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Show

Methods

showPatch :: ShowPatchFor -> RepoPatchV1 prim wX wY -> Doc Source #

PrimPatch prim => ShowPatchBasic (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

showPatch :: ShowPatchFor -> RepoPatchV2 prim wX wY -> Doc Source #

(PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (FL p) Source # 
Instance details

Defined in Darcs.Patch.Viewing

Methods

showPatch :: ShowPatchFor -> FL p wX wY -> Doc Source #

(PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (RL p) Source # 
Instance details

Defined in Darcs.Patch.Viewing

Methods

showPatch :: ShowPatchFor -> RL p wX wY -> Doc Source #

(StorableId name, ShowPatchBasic p) => ShowPatchBasic (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

Methods

showPatch :: ShowPatchFor -> PrimWithName name p wX wY -> Doc Source #

(SignedId name, StorableId name, PrimPatch prim) => ShowPatchBasic (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

showPatch :: ShowPatchFor -> RepoPatchV3 name prim wX wY -> Doc Source #

class Summary p where Source #

Methods

conflictedEffect :: p wX wY -> [IsConflictedPrim (PrimOf p)] Source #

Instances

Instances details
Summary p => Summary (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Commute prim => Summary (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

PrimPatch prim => Summary (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Commute

Summary (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Summary p => Summary (FL p) Source # 
Instance details

Defined in Darcs.Patch.Summary

Methods

conflictedEffect :: FL p wX wY -> [IsConflictedPrim (PrimOf (FL p))] Source #

Summary (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

conflictedEffect :: RepoPatchV3 name prim wX wY -> [IsConflictedPrim (PrimOf (RepoPatchV3 name prim))] Source #

class ToPrim p where Source #

Methods

toPrim :: p wX wY -> Maybe (PrimOf p wX wY) Source #

Instances

Instances details
ToPrim (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Core

Methods

toPrim :: RepoPatchV1 prim wX wY -> Maybe (PrimOf (RepoPatchV1 prim) wX wY) Source #

ToPrim (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

toPrim :: RepoPatchV2 prim wX wY -> Maybe (PrimOf (RepoPatchV2 prim) wX wY) Source #

ToPrim (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

toPrim :: RepoPatchV3 name prim wX wY -> Maybe (PrimOf (RepoPatchV3 name prim) wX wY) Source #

class Unwind p where Source #

Methods

fullUnwind :: p wX wY -> Unwound (PrimOf p) wX wY Source #

Get hold of the underlying primitives for a given patch, placed in the context of the patch. If there are conflicts then context patches will be needed.

Instances

Instances details
(PrimPatchBase p, Unwind p) => Unwind (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Methods

fullUnwind :: Named p wX wY -> Unwound (PrimOf (Named p)) wX wY Source #

PrimPatch prim => Unwind (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Commute

Methods

fullUnwind :: RepoPatchV1 prim wX wY -> Unwound (PrimOf (RepoPatchV1 prim)) wX wY Source #

PrimPatch prim => Unwind (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

fullUnwind :: RepoPatchV2 prim wX wY -> Unwound (PrimOf (RepoPatchV2 prim)) wX wY Source #

(Invert prim, Commute prim, Eq2 prim) => Unwind (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

fullUnwind :: RepoPatchV3 name prim wX wY -> Unwound (PrimOf (RepoPatchV3 name prim)) wX wY Source #