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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Rebase.Viewing

Synopsis

- data RebaseSelect p wX wY where
  - RSFwd :: FL (RebaseFixup p) wX wY -> Named p wY wZ -> RebaseSelect p wX wZ
  - RSRev :: FL (RebaseFixup p) wX wY -> Named p wY wZ -> RebaseSelect p wZ wX
- toRebaseSelect :: PrimPatchBase p => FL (RebaseItem p) wX wY -> FL (RebaseSelect p) wX wY
- fromRebaseSelect :: FL (RebaseSelect p) wX wY -> FL (RebaseItem p) wX wY
- extractRebaseSelect :: (Commute p, Merge p, Invert p, Effect p, FromPrim p, PrimPatchBase p) => FL (RebaseSelect p) wX wY -> (FL (WDDNamed p) :> FL (RebaseFixup p)) wX wY
- reifyRebaseSelect :: forall p wX wY. (PrimPatchBase p, Commute p, Merge p, Invert p, Effect p, FromPrim p) => FL (RebaseSelect p) wX wY -> IO ((FL (WDDNamed p) :> FL (RebaseFixup p)) wX wY)
- partitionUnconflicted :: (PrimPatchBase p, FromPrim p, Effect p, Commute p, Invert p) => FL (RebaseSelect p) wX wY -> (FL (RebaseSelect p) :> RL (RebaseSelect p)) wX wY
- rsToPia :: RebaseSelect p wX wY -> Sealed2 (PatchInfoAnd (RepoType NoRebase) p)
- data WithDroppedDeps p wX wY = WithDroppedDeps {
  - wddPatch :: p wX wY
  - wddDependedOn :: [PatchInfo]
  }
- type WDDNamed p = WithDroppedDeps (Named p)
- commuterIdWDD :: CommuteFn p q -> CommuteFn p (WithDroppedDeps q)
- data RebaseChange p wX wY where
  - RCFwd :: FL (RebaseFixup p) wX wY -> FL p wY wZ -> RebaseChange p wX wZ
  - RCRev :: FL (RebaseFixup p) wX wY -> FL p wY wZ -> RebaseChange p wZ wX
- toRebaseChanges :: PrimPatchBase p => FL (RebaseItem p) wX wY -> FL (PatchInfoAnd (RepoType IsRebase) (RebaseChange p)) wX wY

# Documentation

data RebaseSelect p wX wY where #

Encapsulate a single patch in the rebase state together with its fixups. Used during interactive selection to make sure that each item presented to the user corresponds to a patch.

Constructors

RSFwd :: FL (RebaseFixup p) wX wY -> Named p wY wZ -> RebaseSelect p wX wZ |
RSRev :: FL (RebaseFixup p) wX wY -> Named p wY wZ -> RebaseSelect p wZ wX |

Instances

(Show2 p, Show2 (PrimOf p)) => Show2 (RebaseSelect p) # |
Methods showDict2 :: ShowDict (RebaseSelect p wX wY) #
(PrimPatchBase p, Commute p, MyEq p) => MyEq (RebaseSelect p) # |
Methods unsafeCompare :: RebaseSelect p wA wB -> RebaseSelect p wC wD -> Bool # (=\/=) :: RebaseSelect p wA wB -> RebaseSelect p wA wC -> EqCheck wB wC # (=/\=) :: RebaseSelect p wA wC -> RebaseSelect p wB wC -> EqCheck wA wB #
(PrimPatchBase p, FromPrim p, Effect p, Commute p, Invert p) => Commute (RebaseSelect p) # |
Methods commute :: (RebaseSelect p :> RebaseSelect p) wX wY -> Maybe ((RebaseSelect p :> RebaseSelect p) wX wY) #
PatchDebug p => PatchDebug (RebaseSelect p) # |
Methods patchDebugDummy :: RebaseSelect p wX wY -> () #
(PrimPatchBase p, PatchInspect p) => PatchInspect (RebaseSelect p) # |
Methods listTouchedFiles :: RebaseSelect p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> RebaseSelect p wX wY -> Bool #
Invert p => Invert (RebaseSelect p) # |
Methods invert :: RebaseSelect p wX wY -> RebaseSelect p wY wX #
ReadPatch p => ReadPatch (RebaseSelect p) # |
Methods readPatch' :: ParserM m => m (Sealed (RebaseSelect p wX)) #
(PrimPatchBase p, Invert p, Apply p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Apply (RebaseSelect p) # |
Associated Types type ApplyState (RebaseSelect p :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (RebaseSelect p)) m => RebaseSelect p wX wY -> m () #
(PrimPatchBase p, PatchListFormat p, Apply p, CommuteNoConflicts p, Conflict p, IsHunk p, ShowPatch p) => ShowPatch (RebaseSelect p) # |
Methods showNicely :: RebaseSelect p wX wY -> Doc # showContextPatch :: (Monad m, ApplyMonad (ApplyState (RebaseSelect p)) m) => RebaseSelect p wX wY -> m Doc # description :: RebaseSelect p wX wY -> Doc # summary :: RebaseSelect p wX wY -> Doc # summaryFL :: FL (RebaseSelect p) wX wY -> Doc # thing :: RebaseSelect p wX wY -> String # things :: RebaseSelect p wX wY -> String #
(PrimPatchBase p, PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (RebaseSelect p) # |
Methods showPatch :: RebaseSelect p wX wY -> Doc #
(PrimPatchBase p, PatchListFormat p, Conflict p, FromPrim p, Effect p, CommuteNoConflicts p, IsHunk p, Patchy p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Patchy (RebaseSelect p) # |
PrimPatchBase p => PrimPatchBase (RebaseSelect p) # |
Associated Types type PrimOf (RebaseSelect p :: * -> * -> *) :: * -> * -> * #
(PrimPatchBase p, Invert p, Effect p) => Effect (RebaseSelect p) # |
Methods effect :: RebaseSelect p wX wY -> FL (PrimOf (RebaseSelect p)) wX wY # effectRL :: RebaseSelect p wX wY -> RL (PrimOf (RebaseSelect p)) wX wY #
(PrimPatchBase p, FromPrim p, Conflict p, CommuteNoConflicts p, Invert p) => Conflict (RebaseSelect p) # |
Methods resolveConflicts :: RebaseSelect p wX wY -> [[Sealed (FL (PrimOf (RebaseSelect p)) wY)]] # conflictedEffect :: RebaseSelect p wX wY -> [IsConflictedPrim (PrimOf (RebaseSelect p))] #
(Show2 p, Show2 (PrimOf p)) => Show1 (RebaseSelect p wX) # |
Methods showDict1 :: ShowDict (RebaseSelect p wX wX) #
(Show2 p, Show2 (PrimOf p)) => Show (RebaseSelect p wX wY) # |
Methods showsPrec :: Int -> RebaseSelect p wX wY -> ShowS # show :: RebaseSelect p wX wY -> String # showList :: [RebaseSelect p wX wY] -> ShowS #
type ApplyState (RebaseSelect p) # |
type ApplyState (RebaseSelect p) = ApplyState p
type PrimOf (RebaseSelect p) # |
type PrimOf (RebaseSelect p) = PrimOf p

toRebaseSelect :: PrimPatchBase p => FL (RebaseItem p) wX wY -> FL (RebaseSelect p) wX wY #

Turn a list of rebase items being rebased into a list suitable for use by interactive selection. Each actual patch being rebased is grouped together with any fixups needed.

fromRebaseSelect :: FL (RebaseSelect p) wX wY -> FL (RebaseItem p) wX wY #

Turn a list of items back from the format used for interactive selection into a normal list

extractRebaseSelect :: (Commute p, Merge p, Invert p, Effect p, FromPrim p, PrimPatchBase p) => FL (RebaseSelect p) wX wY -> (FL (WDDNamed p) :> FL (RebaseFixup 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.

reifyRebaseSelect :: forall p wX wY. (PrimPatchBase p, Commute p, Merge p, Invert p, Effect p, FromPrim p) => FL (RebaseSelect p) wX wY -> IO ((FL (WDDNamed p) :> FL (RebaseFixup p)) wX wY) #

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

partitionUnconflicted :: (PrimPatchBase p, FromPrim p, Effect p, Commute p, Invert p) => FL (RebaseSelect p) wX wY -> (FL (RebaseSelect p) :> RL (RebaseSelect p)) wX wY #

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

rsToPia :: RebaseSelect p wX wY -> Sealed2 (PatchInfoAnd (RepoType NoRebase) p) #

Get hold of the `PatchInfoAnd` patch inside a `RebaseSelect`.

data WithDroppedDeps p 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

PrimPatchBase p => PrimPatchBase (WithDroppedDeps p) # |
Associated Types type PrimOf (WithDroppedDeps p :: * -> * -> *) :: * -> * -> * #
Effect p => Effect (WithDroppedDeps p) # |
Methods effect :: WithDroppedDeps p wX wY -> FL (PrimOf (WithDroppedDeps p)) wX wY # effectRL :: WithDroppedDeps p wX wY -> RL (PrimOf (WithDroppedDeps p)) wX wY #
type PrimOf (WithDroppedDeps p) # |
type PrimOf (WithDroppedDeps p) = PrimOf p

type WDDNamed p = WithDroppedDeps (Named p) #

commuterIdWDD :: CommuteFn p q -> CommuteFn p (WithDroppedDeps q) #

data RebaseChange p wX wY where #

Used for displaying during 'rebase changes'. 'Named (RebaseChange p)' is very similar to 'RebaseSelect p' but slight mismatches (`Named` embeds an `FL`) makes it not completely trivial to merge them.

Constructors

RCFwd :: FL (RebaseFixup p) wX wY -> FL p wY wZ -> RebaseChange p wX wZ |
RCRev :: FL (RebaseFixup p) wX wY -> FL p wY wZ -> RebaseChange p wZ wX |

Instances

(Show2 p, Show2 (PrimOf p)) => Show2 (RebaseChange p) # |
Methods showDict2 :: ShowDict (RebaseChange p wX wY) #
PatchListFormat (RebaseChange p) # |
Methods patchListFormat :: ListFormat (RebaseChange p) #
Commute (RebaseChange p) # |
Methods commute :: (RebaseChange p :> RebaseChange p) wX wY -> Maybe ((RebaseChange p :> RebaseChange p) wX wY) #
PatchDebug p => PatchDebug (RebaseChange p) # |
Methods patchDebugDummy :: RebaseChange p wX wY -> () #
(PrimPatchBase p, PatchInspect p) => PatchInspect (RebaseChange p) # |
Methods listTouchedFiles :: RebaseChange p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> RebaseChange p wX wY -> Bool #
Invert (RebaseChange p) # |
Methods invert :: RebaseChange p wX wY -> RebaseChange p wY wX #
ReadPatch (RebaseChange p) # |
Methods readPatch' :: ParserM m => m (Sealed (RebaseChange p wX)) #
(PrimPatchBase p, Invert p, Apply p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Apply (RebaseChange p) # |
Associated Types type ApplyState (RebaseChange p :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (RebaseChange p)) m => RebaseChange p wX wY -> m () #
(PrimPatchBase p, PatchListFormat p, ShowPatchBasic p, Invert p, Effect p, Merge p, FromPrim p, Conflict p, CommuteNoConflicts p) => ShowPatch (RebaseChange p) # |
Methods showNicely :: RebaseChange p wX wY -> Doc # showContextPatch :: (Monad m, ApplyMonad (ApplyState (RebaseChange p)) m) => RebaseChange p wX wY -> m Doc # description :: RebaseChange p wX wY -> Doc # summary :: RebaseChange p wX wY -> Doc # summaryFL :: FL (RebaseChange p) wX wY -> Doc # thing :: RebaseChange p wX wY -> String # things :: RebaseChange p wX wY -> String #
(PrimPatchBase p, PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (RebaseChange p) # |
Methods showPatch :: RebaseChange p wX wY -> Doc #
IsHunk p => IsHunk (RebaseChange p) # |
Methods isHunk :: RebaseChange p wX wY -> Maybe (FileHunk wX wY) #
(PrimPatchBase p, Apply p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p)), Invert p) => Patchy (RebaseChange p) # |
(PrimPatchBase p, Apply p, Invert p, PatchInspect p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Matchable (RebaseChange p) # |
PrimPatch (PrimOf p) => PrimPatchBase (RebaseChange p) # |
Associated Types type PrimOf (RebaseChange p :: * -> * -> *) :: * -> * -> * #
(PrimPatchBase p, Invert p, Effect p) => Effect (RebaseChange p) # |
Methods effect :: RebaseChange p wX wY -> FL (PrimOf (RebaseChange p)) wX wY # effectRL :: RebaseChange p wX wY -> RL (PrimOf (RebaseChange p)) wX wY #
CommuteNoConflicts (RebaseChange p) # |
Methods commuteNoConflicts :: (RebaseChange p :> RebaseChange p) wX wY -> Maybe ((RebaseChange p :> RebaseChange p) wX wY) #
(PrimPatchBase p, Invert p, Effect p, FromPrim p, Merge p, Conflict p, CommuteNoConflicts p) => Conflict (RebaseChange p) # |
Methods resolveConflicts :: RebaseChange p wX wY -> [[Sealed (FL (PrimOf (RebaseChange p)) wY)]] # conflictedEffect :: RebaseChange p wX wY -> [IsConflictedPrim (PrimOf (RebaseChange p))] #
(Show2 p, Show2 (PrimOf p)) => Show1 (RebaseChange p wX) # |
Methods showDict1 :: ShowDict (RebaseChange p wX wX) #
(Show2 p, Show2 (PrimOf p)) => Show (RebaseChange p wX wY) # |
Methods showsPrec :: Int -> RebaseChange p wX wY -> ShowS # show :: RebaseChange p wX wY -> String # showList :: [RebaseChange p wX wY] -> ShowS #
type ApplyState (RebaseChange p) # |
type ApplyState (RebaseChange p) = ApplyState p
type PrimOf (RebaseChange p) # |
type PrimOf (RebaseChange p) = PrimOf p

toRebaseChanges :: PrimPatchBase p => FL (RebaseItem p) wX wY -> FL (PatchInfoAnd (RepoType IsRebase) (RebaseChange p)) wX wY #