Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Named
patches group a set of changes with meta data (PatchInfo
) and
explicit dependencies (created using `darcs tag` or using --ask-deps).
While the data constructor NamedP
is exported for technical reasons, code
outside this modules should (and generally does) treat it as an abstract
data type. The only exception is the rebase implementation i.e. the modules
under Darcs.Patch.Rebase.
Synopsis
- data Named p wX wY where
- 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
- setinfo :: PatchInfo -> Named p wX wY -> Named p wX wY
- anonymous :: FromPrim p => FL (PrimOf p) wX wY -> IO (Named p wX wY)
- class HasDeps p where
- 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
- data ShowWhichDeps
- showDependencies :: ShowWhichDeps -> ShowDepsFormat -> [PatchInfo] -> Doc
Documentation
data Named p wX wY where Source #
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
).
Instances
Apply p => Apply (Named p) Source # | |
Defined in Darcs.Patch.Named apply :: ApplyMonad (ApplyState (Named p)) m => Named p wX wY -> m () Source # unapply :: ApplyMonad (ApplyState (Named p)) m => Named p wX wY -> m () Source # | |
Commute p => Commute (Named p) Source # | |
(Commute p, Conflict p, Summary p, PrimPatchBase p, PatchListFormat p, ShowPatch p) => Conflict (Named p) Source # | This instance takes care of handling the interaction between conflict resolution and explicit dependencies. A conflict involves a set of two or more patches and the general rule is that the conflict is considered resolved if there is another (later) patch that (transitively) depends on each of the (mutually) conflicting patches. This principle extends to explicit dependencies between In general a Named A [] a Named B [] (b1;b2) Named C [] c Named D [A,B] _ where, at the RepoPatch level, When we decide that a set of conflicting Named patches is resolved, we move the RepoPatches contained in them to the context of the resolution. For all other named patches, we must commute as much of their contents as possible past the ones marked as resolved, using commutation at the RepoPatch level (i.e. ignoring explicit dependencies). |
Defined in Darcs.Patch.Named isConflicted :: Named p wX wY -> Bool Source # resolveConflicts :: RL (Named p) wO wX -> RL (Named p) wX wY -> [ConflictDetails (PrimOf (Named p)) wY] Source # | |
(Commute p, Conflict p, Summary p, PrimPatchBase p, PatchListFormat p, ShowPatch p) => Conflict (PatchInfoAnd p) Source # | |
Defined in Darcs.Patch.PatchInfoAnd isConflicted :: PatchInfoAnd p wX wY -> Bool Source # resolveConflicts :: RL (PatchInfoAnd p) wO wX -> RL (PatchInfoAnd p) wX wY -> [ConflictDetails (PrimOf (PatchInfoAnd p)) wY] Source # | |
PatchDebug p => PatchDebug (Named p) Source # | |
Defined in Darcs.Patch.Named patchDebugDummy :: Named p wX wY -> () Source # | |
Effect p => Effect (Named p) Source # | |
IsHunk (Named p) Source # | |
Defined in Darcs.Patch.Named | |
PatchListFormat (Named p) Source # | |
Defined in Darcs.Patch.Named patchListFormat :: ListFormat (Named p) Source # | |
PrimPatchBase p => PrimPatchBase (Named p) Source # | |
Ident (Named p) Source # | |
PatchInspect p => PatchInspect (Named p) Source # | |
Defined in Darcs.Patch.Named listTouchedFiles :: Named p wX wY -> [AnchoredPath] Source # hunkMatches :: (ByteString -> Bool) -> Named p wX wY -> Bool Source # | |
CleanMerge p => CleanMerge (Named p) Source # | |
Merge p => Merge (Named p) Source # | |
HasDeps (Named p) Source # | |
(ReadPatch p, PatchListFormat p) => ReadPatch (Named p) Source # | |
Defined in Darcs.Patch.Named | |
Check p => Check (Named p) Source # | |
Defined in Darcs.Patch.Named | |
RepairToFL p => Repair (Named p) Source # | |
Defined in Darcs.Patch.Named applyAndTryToFix :: ApplyMonad (ApplyState (Named p)) m => Named p wX wY -> m (Maybe (String, Named p wX wY)) Source # | |
RepairToFL p => Repair (PatchInfoAnd p) Source # | |
Defined in Darcs.Patch.PatchInfoAnd applyAndTryToFix :: ApplyMonad (ApplyState (PatchInfoAnd p)) m => PatchInfoAnd p wX wY -> m (Maybe (String, PatchInfoAnd p wX wY)) Source # | |
(Apply p, IsHunk p, PatchListFormat p, ObjectId (ObjectIdOfPatch p), ShowContextPatch p) => ShowContextPatch (Named p) Source # | |
Defined in Darcs.Patch.Named showPatchWithContextAndApply :: ApplyMonad (ApplyState (Named p)) m => ShowPatchFor -> Named p wX wY -> m Doc Source # | |
(Summary p, PatchListFormat p, PrimPatchBase p, ShowPatch p) => ShowPatch (Named p) Source # | |
(PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (Named p) Source # | |
Defined in Darcs.Patch.Named | |
Summary p => Summary (Named p) Source # | |
Defined in Darcs.Patch.Named conflictedEffect :: Named p wX wY -> [IsConflictedPrim (PrimOf (Named p))] Source # | |
(PrimPatchBase p, Unwind p) => Unwind (Named p) Source # | |
Defined in Darcs.Patch.Named | |
(Commute p, Eq2 p) => Eq2 (Named p) Source # | |
Show2 p => Show2 (Named p) Source # | |
Defined in Darcs.Patch.Named | |
Show2 p => Show2 (PatchInfoAnd p) Source # | |
Defined in Darcs.Patch.PatchInfoAnd showDict2 :: ShowDict (PatchInfoAnd p wX wY) Source # | |
Show2 p => Show1 (Named p wX) Source # | |
Show2 p => Show1 (PatchInfoAnd p wX) Source # | |
Defined in Darcs.Patch.PatchInfoAnd | |
Show2 p => Show (Named p wX wY) Source # | |
type ApplyState (Named p) Source # | |
Defined in Darcs.Patch.Named | |
type PrimOf (Named p) Source # | |
Defined in Darcs.Patch.Named | |
type PatchId (Named p) Source # | |
Defined in Darcs.Patch.Named |
infopatch :: forall p wX wY. FromPrim p => PatchInfo -> FL (PrimOf p) wX wY -> Named p wX wY Source #
class HasDeps p where Source #
This slightly ad-hoc class is here so we can call getdeps
with patch
types that wrap a Named
, such as RebaseChange
.
Instances
HasDeps (Named p) Source # | |
HasDeps (RebaseChange prim) Source # | |
Defined in Darcs.Patch.Rebase.Change getdeps :: RebaseChange prim wX wY -> [PatchInfo] Source # |
patch2patchinfo :: Named p wX wY -> PatchInfo Source #
patchcontents :: Named p wX wY -> FL p wX wY Source #
data ShowDepsFormat Source #
Instances
Eq ShowDepsFormat Source # | |
Defined in Darcs.Patch.Named (==) :: ShowDepsFormat -> ShowDepsFormat -> Bool # (/=) :: ShowDepsFormat -> ShowDepsFormat -> Bool # |
data ShowWhichDeps Source #
Support for rebase
Instances
Eq ShowWhichDeps Source # | |
Defined in Darcs.Patch.Named (==) :: ShowWhichDeps -> ShowWhichDeps -> Bool # (/=) :: ShowWhichDeps -> ShowWhichDeps -> Bool # |
showDependencies :: ShowWhichDeps -> ShowDepsFormat -> [PatchInfo] -> Doc Source #