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

Safe Haskell | Safe-Inferred
Language | Haskell2010

Darcs.Patch.Named

Synopsis

- data Named p wX wY where
  - NamedP :: !PatchInfo -> ![PatchInfo] -> !(FL p wX wY) -> Named p wX wY
- infopatch :: forall p wX wY. FromPrim p => PatchInfo -> FL (PrimOf p) wX wY -> Named p wX wY
- adddeps :: Named p wX wY -> [PatchInfo] -> Named p wX wY
- anonymous :: FromPrim p => FL (PrimOf p) wX wY -> IO (Named p wX wY)
- class HasDeps p where
  - getdeps :: p wX wY -> [PatchInfo]
- patch2patchinfo :: Named p wX wY -> PatchInfo
- patchname :: Named p wX wY -> String
- patchcontents :: Named p wX wY -> FL p wX wY
- fmapNamed :: (forall wA wB. p wA wB -> q wA wB) -> Named p wX wY -> Named q wX wY
- fmapFL_Named :: (FL p wA wB -> FL q wC wD) -> Named p wA wB -> Named q wC wD
- mergerIdNamed :: MergeFn p1 p2 -> MergeFn p1 (Named p2)
- data ShowDepsFormat
  - = ShowDepsVerbose
  - | ShowDepsSummary
- showDependencies :: ShowDepsFormat -> [PatchInfo] -> Doc

# Documentation

data Named p wX wY where #

The `Named` type adds a patch info about a patch, that is a name.

`NamedP info deps p` represents patch `p` with name `info`. `deps` is a list of dependencies added at the named patch level, compared with the unnamed level (ie, dependencies added with `darcs record --ask-deps`).

Constructors

NamedP :: !PatchInfo -> ![PatchInfo] -> !(FL p wX wY) -> Named p wX wY |

#### Instances

Instances details

Apply p => Apply (Named p) # |
Instance details Defined in Darcs.Patch.Named Associated Types type ApplyState (Named p) :: (Type -> Type) -> Type # Methods apply :: ApplyMonad (ApplyState (Named p)) m => Named p wX wY -> m () # unapply :: ApplyMonad (ApplyState (Named p)) m => Named p wX wY -> m () #
Commute p => Commute (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods commute :: (Named p :> Named p) wX wY -> Maybe ((Named p :> Named p) wX wY) #
(Commute p, Conflict p) => Conflict (Named p) # | This instance takes care of handling the interaction between conflict resolution and explicit dependencies. By definition, a conflict counts as resolved if another patch depends on it. This principle extends to explicit dependencies between `Named` patches, but not to (aggregate) implicit dependencies. This means we count any patch inside a `Named` patch as resolved if some later `Named` patch depends on it explicitly. The patches contained inside a `Named` patch that is not explicitly depended on must be commuted one by one past those we know are resolved. It is important to realize that we must not do this commutation at the `Named` patch level but at the level below that.
Instance details Defined in Darcs.Patch.Named Methods resolveConflicts :: RL (Named p) wO wX -> RL (Named p) wX wY -> [ConflictDetails (PrimOf (Named p)) wY] #
PatchDebug p => PatchDebug (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods patchDebugDummy :: Named p wX wY -> () #
Effect p => Effect (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods effect :: Named p wX wY -> FL (PrimOf (Named p)) wX wY #
IsHunk (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods isHunk :: Named p wX wY -> Maybe (FileHunk wX wY) #
PatchListFormat (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods patchListFormat :: ListFormat (Named p) #
PrimPatchBase p => PrimPatchBase (Named p) # |
Instance details Defined in Darcs.Patch.Named Associated Types type PrimOf (Named p) :: Type -> Type -> Type #
IdEq2 (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods (=\^/=) :: Named p wA wB -> Named p wA wC -> EqCheck wB wC # (=/^\=) :: Named p wA wC -> Named p wB wC -> EqCheck wA wB #
Ident (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods ident :: Named p wX wY -> PatchId (Named p) #
PatchInspect p => PatchInspect (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods listTouchedFiles :: Named p wX wY -> [AnchoredPath] # hunkMatches :: (ByteString -> Bool) -> Named p wX wY -> Bool #
CleanMerge p => CleanMerge (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods cleanMerge :: (Named p :\/: Named p) wX wY -> Maybe ((Named p :/\: Named p) wX wY) #
Merge p => Merge (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods merge :: (Named p :\/: Named p) wX wY -> (Named p :/\: Named p) wX wY #
HasDeps (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods getdeps :: Named p wX wY -> [PatchInfo] #
(ReadPatch p, PatchListFormat p) => ReadPatch (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods readPatch' :: Parser (Sealed (Named p wX)) #
Check p => Check (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods isInconsistent :: Named p wX wY -> Maybe Doc #
RepairToFL p => Repair (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods applyAndTryToFix :: ApplyMonad (ApplyState (Named p)) m => Named p wX wY -> m (Maybe (String, Named p wX wY)) #
(Apply p, IsHunk p, PatchListFormat p, ShowContextPatch p) => ShowContextPatch (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods showContextPatch :: ApplyMonad (ApplyState (Named p)) m => ShowPatchFor -> Named p wX wY -> m Doc #
(Summary p, PatchListFormat p, PrimPatchBase p, ShowPatch p) => ShowPatch (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods content :: Named p wX wY -> Doc # description :: Named p wX wY -> Doc # summary :: Named p wX wY -> Doc # summaryFL :: FL (Named p) wX wY -> Doc # thing :: Named p wX wY -> String # things :: Named p wX wY -> String #
(PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods showPatch :: ShowPatchFor -> Named p wX wY -> Doc #
Summary p => Summary (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods conflictedEffect :: Named p wX wY -> [IsConflictedPrim (PrimOf (Named p))] #
(PrimPatchBase p, Unwind p) => Unwind (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods fullUnwind :: Named p wX wY -> Unwound (PrimOf (Named p)) wX wY #
Eq2 (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods unsafeCompare :: Named p wA wB -> Named p wC wD -> Bool # (=\/=) :: Named p wA wB -> Named p wA wC -> EqCheck wB wC # (=/\=) :: Named p wA wC -> Named p wB wC -> EqCheck wA wB #
Show2 p => Show2 (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods showDict2 :: ShowDict (Named p wX wY) #
(Commute p, Conflict p) => Conflict (PatchInfoAnd rt p) # |
Instance details Defined in Darcs.Patch.PatchInfoAnd Methods resolveConflicts :: RL (PatchInfoAnd rt p) wO wX -> RL (PatchInfoAnd rt p) wX wY -> [ConflictDetails (PrimOf (PatchInfoAnd rt p)) wY] #
RepairToFL p => Repair (PatchInfoAnd rt p) # |
Instance details Defined in Darcs.Patch.PatchInfoAnd Methods applyAndTryToFix :: ApplyMonad (ApplyState (PatchInfoAnd rt p)) m => PatchInfoAnd rt p wX wY -> m (Maybe (String, PatchInfoAnd rt p wX wY)) #
Show2 p => Show1 (Named p wX) # |
Instance details Defined in Darcs.Patch.Named Methods showDict1 :: Dict (Show (Named p wX wX0)) #
Show2 p => Show2 (PatchInfoAnd rt p) # |
Instance details Defined in Darcs.Patch.PatchInfoAnd Methods showDict2 :: ShowDict (PatchInfoAnd rt p wX wY) #
Show2 p => Show (Named p wX wY) # |
Instance details Defined in Darcs.Patch.Named Methods showsPrec :: Int -> Named p wX wY -> ShowS # show :: Named p wX wY -> String # showList :: [Named p wX wY] -> ShowS #
Show2 p => Show1 (PatchInfoAnd rt p wX) # |
Instance details Defined in Darcs.Patch.PatchInfoAnd Methods showDict1 :: Dict (Show (PatchInfoAnd rt p wX wX0)) #
type ApplyState (Named p) # |
Instance details Defined in Darcs.Patch.Named type ApplyState (Named p) = ApplyState p
type PrimOf (Named p) # |
Instance details Defined in Darcs.Patch.Named type PrimOf (Named p) = PrimOf p
type PatchId (Named p) # |
Instance details Defined in Darcs.Patch.Named type PatchId (Named p) = PatchInfo

infopatch :: forall p wX wY. FromPrim p => PatchInfo -> FL (PrimOf p) wX wY -> Named p wX wY #

adddeps :: Named p wX wY -> [PatchInfo] -> Named p wX wY #

anonymous :: FromPrim p => FL (PrimOf p) wX wY -> IO (Named p wX wY) #

class HasDeps p where #

This slightly ad-hoc class is here so we can call `getdeps` with patch types that wrap a `Named`, such as `RebaseChange`.

Methods

getdeps :: p wX wY -> [PatchInfo] #

#### Instances

Instances details

HasDeps (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods getdeps :: Named p wX wY -> [PatchInfo] #
HasDeps (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods getdeps :: RebaseChange prim wX wY -> [PatchInfo] #

patch2patchinfo :: Named p wX wY -> PatchInfo #

patchname :: Named p wX wY -> String #

patchcontents :: Named p wX wY -> FL p wX wY #

fmapNamed :: (forall wA wB. p wA wB -> q wA wB) -> Named p wX wY -> Named q wX wY #

fmapFL_Named :: (FL p wA wB -> FL q wC wD) -> Named p wA wB -> Named q wC wD #

mergerIdNamed :: MergeFn p1 p2 -> MergeFn p1 (Named p2) #

data ShowDepsFormat #

Constructors

ShowDepsVerbose |
ShowDepsSummary |

#### Instances

Instances details

Eq ShowDepsFormat # |
Instance details Defined in Darcs.Patch.Named Methods (==) :: ShowDepsFormat -> ShowDepsFormat -> Bool # (/=) :: ShowDepsFormat -> ShowDepsFormat -> Bool #

showDependencies :: ShowDepsFormat -> [PatchInfo] -> Doc #