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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Rebase.Container

Synopsis

- data Suspended p wX wY where
  - Items :: FL (RebaseItem p) wX wY -> Suspended p wX wX
- countToEdit :: Suspended p wX wY -> Int
- simplifyPush :: (PrimPatchBase p, Commute p, FromPrim p, Effect p) => DiffAlgorithm -> RebaseFixup p wX wY -> Suspended p wY wY -> Suspended p wX wX
- simplifyPushes :: (PrimPatchBase p, Commute p, FromPrim p, Effect p) => DiffAlgorithm -> FL (RebaseFixup p) wX wY -> Suspended p wY wY -> Suspended p wX wX
- addFixupsToSuspended :: (PrimPatchBase p, Commute p, FromPrim p, Effect p) => Named p wX wY -> Suspended p wY wY -> Suspended p wX wX
- removeFixupsFromSuspended :: (PrimPatchBase p, Commute p, FromPrim p, Effect p) => Named p wX wY -> Suspended p wX wX -> Suspended p wY wY

# Documentation

data Suspended p wX wY where #

A patch that lives in a repository where a rebase is in progress. Such a repository will consist of `Normal` patches along with exactly one `Suspended` patch.

Most rebase operations will require the `Suspended` patch to be at the end of the repository.

`Normal` represents a normal patch within a respository where a rebase is in progress. `Normal p` is given the same on-disk representation as `p`, so a repository can be switched into and out of rebasing mode simply by adding or removing a `Suspended` patch and setting the appropriate format flag.

The single `Suspended` patch contains the entire rebase state, in the form of `RebaseItem`s.

Note that the witnesses are such that the `Suspended` patch has no effect on the context of the rest of the repository; in a sense the patches within it are dangling off to one side from the main repository.

See Note [Rebase representation] in the `Rebase` for a discussion of the design choice to embed the rebase state in a single patch.

Constructors

Items :: FL (RebaseItem p) wX wY -> Suspended p wX wX |

Instances

(Show2 p, Show2 (PrimOf p)) => Show2 (Suspended p) # |
Methods showDict2 :: ShowDict (Suspended p wX wY) #
(PrimPatchBase p, PatchInspect p) => PatchInspect (Suspended p) # |
Methods listTouchedFiles :: Suspended p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> Suspended p wX wY -> Bool #
(PrimPatchBase p, PatchListFormat p, ReadPatch p) => ReadPatch (Suspended p) # |
Methods readPatch' :: ParserM m => m (Sealed (Suspended p wX)) #
Apply p => Apply (Suspended p) # |
Associated Types type ApplyState (Suspended p :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (Suspended p)) m => Suspended p wX wY -> m () #
Apply p => RepairToFL (Suspended p) # |
Methods applyAndTryToFixFL :: ApplyMonad (ApplyState (Suspended p)) m => Suspended p wX wY -> m (Maybe (String, FL (Suspended p) wX wY)) #
Apply p => Repair (Suspended p) # |
Methods applyAndTryToFix :: ApplyMonad (ApplyState (Suspended p)) m => Suspended p wX wY -> m (Maybe (String, Suspended p wX wY)) #
Check p => Check (Suspended p) # |
Methods isInconsistent :: Suspended p wX wY -> Maybe Doc #
(PrimPatchBase p, PatchListFormat p, Apply p, CommuteNoConflicts p, Conflict p, IsHunk p, ShowPatch p) => ShowPatch (Suspended p) # |
Methods showNicely :: Suspended p wX wY -> Doc # showContextPatch :: (Monad m, ApplyMonad (ApplyState (Suspended p)) m) => Suspended p wX wY -> m Doc # description :: Suspended p wX wY -> Doc # summary :: Suspended p wX wY -> Doc # summaryFL :: FL (Suspended p) wX wY -> Doc # thing :: Suspended p wX wY -> String # things :: Suspended p wX wY -> String #
(PrimPatchBase p, PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (Suspended p) # |
Methods showPatch :: Suspended p wX wY -> Doc #
PrimPatchBase p => PrimPatchBase (Suspended p) # |
Associated Types type PrimOf (Suspended p :: * -> * -> *) :: * -> * -> * #
Effect (Suspended p) # |
Methods effect :: Suspended p wX wY -> FL (PrimOf (Suspended p)) wX wY # effectRL :: Suspended p wX wY -> RL (PrimOf (Suspended p)) wX wY #
Conflict p => Conflict (Suspended p) # |
Methods resolveConflicts :: Suspended p wX wY -> [[Sealed (FL (PrimOf (Suspended p)) wY)]] # conflictedEffect :: Suspended p wX wY -> [IsConflictedPrim (PrimOf (Suspended p))] #
(Show2 p, Show2 (PrimOf p)) => Show1 (Suspended p wX) # |
Methods showDict1 :: ShowDict (Suspended p wX wX) #
(Show2 p, Show2 (PrimOf p)) => Show (Suspended p wX wY) # |
Methods showsPrec :: Int -> Suspended p wX wY -> ShowS # show :: Suspended p wX wY -> String # showList :: [Suspended p wX wY] -> ShowS #
type ApplyState (Suspended p) # |
type ApplyState (Suspended p) = ApplyState p
type PrimOf (Suspended p) # |
type PrimOf (Suspended p) = PrimOf p

countToEdit :: Suspended p wX wY -> Int #

simplifyPush :: (PrimPatchBase p, Commute p, FromPrim p, Effect p) => DiffAlgorithm -> RebaseFixup p wX wY -> Suspended p wY wY -> Suspended p wX wX #

simplifyPushes :: (PrimPatchBase p, Commute p, FromPrim p, Effect p) => DiffAlgorithm -> FL (RebaseFixup p) wX wY -> Suspended p wY wY -> Suspended p wX wX #

addFixupsToSuspended :: (PrimPatchBase p, Commute p, FromPrim p, Effect p) => Named p wX wY -> Suspended p wY wY -> Suspended p wX wX #

add fixups for the name and effect of a patch to a `Suspended`

removeFixupsFromSuspended :: (PrimPatchBase p, Commute p, FromPrim p, Effect p) => Named p wX wY -> Suspended p wX wX -> Suspended p wY wY #

remove fixups (actually, add their inverse) for the name and effect of a patch to a `Suspended`