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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Rebase.Suspended

Synopsis

- data Suspended (p :: Type -> Type -> Type) wX where
  - Items :: forall (p :: Type -> Type -> Type) wX wY. FL (RebaseChange (PrimOf p)) wX wY -> Suspended p wX
- countToEdit :: forall (p :: Type -> Type -> Type) wX. Suspended p wX -> Int
- simplifyPush :: forall (p :: Type -> Type -> Type) wX wY. PrimPatchBase p => DiffAlgorithm -> RebaseFixup (PrimOf p) wX wY -> Suspended p wY -> Suspended p wX
- simplifyPushes :: forall (p :: Type -> Type -> Type) wX wY. PrimPatchBase p => DiffAlgorithm -> FL (RebaseFixup (PrimOf p)) wX wY -> Suspended p wY -> Suspended p wX
- addFixupsToSuspended :: forall (p :: Type -> Type -> Type) wX wY. (PrimPatchBase p, Effect p) => Named p wX wY -> Suspended p wY -> Suspended p wX
- removeFixupsFromSuspended :: forall (p :: Type -> Type -> Type) wX wY. (PrimPatchBase p, Effect p) => Named p wX wY -> Suspended p wX -> Suspended p wY
- addToEditsToSuspended :: forall (p :: Type -> Type -> Type) wX wY. RepoPatch p => DiffAlgorithm -> FL (Named p) wX wY -> Suspended p wY -> IO (Suspended p wX)
- readSuspended :: forall (p :: Type -> Type -> Type) wX. RepoPatch p => Parser (Suspended p wX)
- showSuspended :: forall (p :: Type -> Type -> Type) wX. PrimPatchBase p => ShowPatchFor -> Suspended p wX -> Doc

# Documentation

data Suspended (p :: Type -> Type -> Type) wX where #

A `Suspended` patch contains the entire rebase state, in the form of `RebaseChange`s. The end state is existientially quantified and thus hidden.

Constructors

Items :: forall (p :: Type -> Type -> Type) wX wY. FL (RebaseChange (PrimOf p)) wX wY -> Suspended p wX |

#### Instances

Instances details

(Show2 p, Show2 (PrimOf p)) => Show (Suspended p wX) # |
Instance details Defined in Darcs.Patch.Rebase.Suspended Methods showsPrec :: Int -> Suspended p wX -> ShowS # show :: Suspended p wX -> String # showList :: [Suspended p wX] -> ShowS #

countToEdit :: forall (p :: Type -> Type -> Type) wX. Suspended p wX -> Int #

simplifyPush :: forall (p :: Type -> Type -> Type) wX wY. PrimPatchBase p => DiffAlgorithm -> RebaseFixup (PrimOf p) wX wY -> Suspended p wY -> Suspended p wX #

simplifyPushes :: forall (p :: Type -> Type -> Type) wX wY. PrimPatchBase p => DiffAlgorithm -> FL (RebaseFixup (PrimOf p)) wX wY -> Suspended p wY -> Suspended p wX #

addFixupsToSuspended :: forall (p :: Type -> Type -> Type) wX wY. (PrimPatchBase p, Effect p) => Named p wX wY -> Suspended p wY -> Suspended p wX #

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

removeFixupsFromSuspended :: forall (p :: Type -> Type -> Type) wX wY. (PrimPatchBase p, Effect p) => Named p wX wY -> Suspended p wX -> Suspended p wY #

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

addToEditsToSuspended :: forall (p :: Type -> Type -> Type) wX wY. RepoPatch p => DiffAlgorithm -> FL (Named p) wX wY -> Suspended p wY -> IO (Suspended p wX) #

Add `Named` patches for editing to a `Suspended`. The patches to be suspended are renamed by replacing the junk in their `Patchinfo`.

The reason we rename patches immediately when suspending them is that the user may pull an identical copy from a clone, Which means we have the same patch name twice, once in the normal repo and once suspended. Furthermore, they can again suspend that copy, leaving us with multiple copies of the same patch in the rebase state. This is bad because it invalidates most of the invariants for RebaseName fixups. See issue2445 and tests/rebase-repull.sh for examples which lead to crashes when we don't do the renaming here.

readSuspended :: forall (p :: Type -> Type -> Type) wX. RepoPatch p => Parser (Suspended p wX) #

showSuspended :: forall (p :: Type -> Type -> Type) wX. PrimPatchBase p => ShowPatchFor -> Suspended p wX -> Doc #