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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Rebase.Change

Synopsis

- data RebaseChange (prim :: Type -> Type -> Type) wX wY where
  - RC :: forall (prim :: Type -> Type -> Type) wX wY1 wY. FL (RebaseFixup prim) wX wY1 -> Named prim wY1 wY -> RebaseChange prim wX wY
- extractRebaseChange :: forall (p :: Type -> Type -> Type) wX wY. RepoPatch p => DiffAlgorithm -> FL (RebaseChange (PrimOf p)) wX wY -> (FL (WDDNamed p) :> FL (RebaseFixup (PrimOf p))) wX wY
- reifyRebaseChange :: forall (p :: Type -> Type -> Type) wX wY. FromPrim p => String -> FL (RebaseChange (PrimOf p)) wX wY -> IO ((FL (WDDNamed p) :> FL (RebaseFixup (PrimOf p))) wX wY)
- partitionUnconflicted :: forall (prim :: Type -> Type -> Type) wX wY. Commute prim => FL (RebaseChange prim) wX wY -> (FL (RebaseChange prim) :> RL (RebaseChange prim)) wX wY
- rcToPia :: forall (prim :: Type -> Type -> Type) wX wY. RebaseChange prim wX wY -> Sealed2 (PatchInfoAnd prim)
- data WithDroppedDeps (p :: Type -> Type -> Type) wX wY = WithDroppedDeps {
  - wddPatch :: p wX wY
  - wddDependedOn :: [PatchInfo]
  }
- type WDDNamed (p :: Type -> Type -> Type) = WithDroppedDeps (Named p)
- commuterIdWDD :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). CommuteFn p q -> CommuteFn p (WithDroppedDeps q)
- simplifyPush :: forall (prim :: Type -> Type -> Type) wX wY wZ. PrimPatch prim => DiffAlgorithm -> RebaseFixup prim wX wY -> FL (RebaseChange prim) wY wZ -> Sealed (FL (RebaseChange prim) wX)
- simplifyPushes :: forall (prim :: Type -> Type -> Type) wX wY wZ. PrimPatch prim => DiffAlgorithm -> FL (RebaseFixup prim) wX wY -> FL (RebaseChange prim) wY wZ -> Sealed (FL (RebaseChange prim) wX)
- addNamedToRebase :: forall (p :: Type -> Type -> Type) wX wY wZ. RepoPatch p => DiffAlgorithm -> Named p wX wY -> FL (RebaseChange (PrimOf p)) wY wZ -> Sealed (FL (RebaseChange (PrimOf p)) wX)

# Documentation

data RebaseChange (prim :: Type -> Type -> Type) wX wY where #

Constructors

RC :: forall (prim :: Type -> Type -> Type) wX wY1 wY. FL (RebaseFixup prim) wX wY1 -> Named prim wY1 wY -> RebaseChange prim wX wY |

#### Instances

Instances details

Apply prim => Apply (RebaseChange prim) # |

Instance details

Defined in Darcs.Patch.Rebase.Change

Associated Types

type ApplyState (RebaseChange prim) |
Instance details Defined in Darcs.Patch.Rebase.Change type ApplyState (RebaseChange prim) = ApplyState prim

Methods

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

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

Commute prim => Commute (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods commute :: (RebaseChange prim :> RebaseChange prim) wX wY -> Maybe ((RebaseChange prim :> RebaseChange prim) wX wY) #
PatchDebug prim => PatchDebug (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods patchDebugDummy :: RebaseChange prim wX wY -> () #
IsHunk (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods isHunk :: RebaseChange prim wX wY -> Maybe (FileHunk (ObjectIdOfPatch (RebaseChange prim)) wX wY) #
PatchListFormat (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods patchListFormat :: ListFormat (RebaseChange prim) #
PrimPatch prim => PrimPatchBase (RebaseChange prim) # |

Instance details

Defined in Darcs.Patch.Rebase.Change

Associated Types

type PrimOf (RebaseChange prim) |
Instance details Defined in Darcs.Patch.Rebase.Change type PrimOf (RebaseChange prim) = prim

Ident (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods ident :: RebaseChange prim wX wY -> PatchId (RebaseChange prim) #
PatchInspect prim => PatchInspect (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods listTouchedFiles :: RebaseChange prim wX wY -> [AnchoredPath] # hunkMatches :: (ByteString -> Bool) -> RebaseChange prim wX wY -> Bool #
HasDeps (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods getdeps :: RebaseChange prim wX wY -> [PatchInfo] #
(ReadPatch prim, PatchListFormat prim) => ReadPatch (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods readPatch' :: Parser (Sealed (RebaseChange prim wX)) #
PrimPatch prim => ShowContextPatch (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods showPatchWithContextAndApply :: ApplyMonad (ApplyState (RebaseChange prim)) m => ShowPatchFor -> RebaseChange prim wX wY -> m Doc #
PrimPatch prim => ShowPatch (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods content :: RebaseChange prim wX wY -> Doc # description :: RebaseChange prim wX wY -> Doc # summary :: RebaseChange prim wX wY -> Doc # summaryFL :: FL (RebaseChange prim) wX wY -> Doc # thing :: RebaseChange prim wX wY -> String # things :: RebaseChange prim wX wY -> String #
PrimPatch prim => ShowPatchBasic (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods showPatch :: ShowPatchFor -> RebaseChange prim wX wY -> Doc #
Commute prim => Summary (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods conflictedEffect :: RebaseChange prim wX wY -> [IsConflictedPrim (PrimOf (RebaseChange prim))] #
Show2 prim => Show2 (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods showDict2 :: ShowDict (RebaseChange prim wX wY) #
Show2 prim => Show1 (RebaseChange prim wX) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods showDict1 :: Dict (Show (RebaseChange prim wX wX0)) #
Show2 prim => Show (RebaseChange prim wX wY) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods showsPrec :: Int -> RebaseChange prim wX wY -> ShowS # show :: RebaseChange prim wX wY -> String # showList :: [RebaseChange prim wX wY] -> ShowS #
type ApplyState (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change type ApplyState (RebaseChange prim) = ApplyState prim
type PrimOf (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change type PrimOf (RebaseChange prim) = prim
type PatchId (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change type PatchId (RebaseChange prim) = PatchInfo

extractRebaseChange :: forall (p :: Type -> Type -> Type) wX wY. RepoPatch p => DiffAlgorithm -> FL (RebaseChange (PrimOf p)) wX wY -> (FL (WDDNamed p) :> FL (RebaseFixup (PrimOf p))) wX wY #

Turn a selected rebase patch back into a patch we can apply to the main repository, together with residual fixups that need to go back into the rebase state (unless the rebase is now finished). Any fixups associated with the patch will turn into conflicts.

reifyRebaseChange :: forall (p :: Type -> Type -> Type) wX wY. FromPrim p => String -> FL (RebaseChange (PrimOf p)) wX wY -> IO ((FL (WDDNamed p) :> FL (RebaseFixup (PrimOf p))) wX wY) #

Like `extractRebaseChange`, but any fixups are "reified" into a separate patch.

partitionUnconflicted :: forall (prim :: Type -> Type -> Type) wX wY. Commute prim => FL (RebaseChange prim) wX wY -> (FL (RebaseChange prim) :> RL (RebaseChange prim)) wX wY #

Split a list of rebase patches into those that will have conflicts if unsuspended and those that won't.

rcToPia :: forall (prim :: Type -> Type -> Type) wX wY. RebaseChange prim wX wY -> Sealed2 (PatchInfoAnd prim) #

Get hold of the `Named` patch inside a `RebaseChange` and wrap it in a `PatchInfoAnd`.

data WithDroppedDeps (p :: Type -> Type -> Type) wX wY #

A patch, together with a list of patch names that it used to depend on, but were lost during the rebasing process. The UI can use this information to report them to the user.

Constructors

WithDroppedDeps |

Fields

- wddPatch :: p wX wY
- wddDependedOn :: [PatchInfo]

#### Instances

Instances details

Effect p => Effect (WithDroppedDeps p) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods effect :: WithDroppedDeps p wX wY -> FL (PrimOf (WithDroppedDeps p)) wX wY #
PrimPatchBase p => PrimPatchBase (WithDroppedDeps p) # |

Instance details

Defined in Darcs.Patch.Rebase.Change

Associated Types

type PrimOf (WithDroppedDeps p) |
Instance details Defined in Darcs.Patch.Rebase.Change type PrimOf (WithDroppedDeps p) = PrimOf p

type PrimOf (WithDroppedDeps p) # |
Instance details Defined in Darcs.Patch.Rebase.Change type PrimOf (WithDroppedDeps p) = PrimOf p

type WDDNamed (p :: Type -> Type -> Type) = WithDroppedDeps (Named p) #

commuterIdWDD :: forall (p :: Type -> Type -> Type) (q :: Type -> Type -> Type). CommuteFn p q -> CommuteFn p (WithDroppedDeps q) #

simplifyPush :: forall (prim :: Type -> Type -> Type) wX wY wZ. PrimPatch prim => DiffAlgorithm -> RebaseFixup prim wX wY -> FL (RebaseChange prim) wY wZ -> Sealed (FL (RebaseChange prim) wX) #

Given a list of rebase items, try to push a new fixup as far as possible into the list as possible, using both commutation and coalescing. If the fixup commutes past all the `ToEdit` patches then it is dropped entirely.

simplifyPushes :: forall (prim :: Type -> Type -> Type) wX wY wZ. PrimPatch prim => DiffAlgorithm -> FL (RebaseFixup prim) wX wY -> FL (RebaseChange prim) wY wZ -> Sealed (FL (RebaseChange prim) wX) #

Like `simplifyPush` but for a list of fixups.

addNamedToRebase :: forall (p :: Type -> Type -> Type) wX wY wZ. RepoPatch p => DiffAlgorithm -> Named p wX wY -> FL (RebaseChange (PrimOf p)) wY wZ -> Sealed (FL (RebaseChange (PrimOf p)) wX) #