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

Safe HaskellNone
LanguageHaskell2010

Darcs.Patch.Patchy

Synopsis

Documentation

class (Apply p, Commute p, Invert p) => Patchy p Source #

Instances

class Apply p where Source #

Minimal complete definition

apply

Associated Types

type ApplyState p :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState p) m => p wX wY -> m () Source #

Instances

Apply DummyPatch Source # 

Associated Types

type ApplyState (DummyPatch :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState DummyPatch) m => DummyPatch wX wY -> m () Source #

Apply p => Apply (RL p) Source # 

Associated Types

type ApplyState (RL p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState (RL p)) m => RL p wX wY -> m () Source #

Apply p => Apply (FL p) Source # 

Associated Types

type ApplyState (FL p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState (FL p)) m => FL p wX wY -> m () Source #

Apply p => Apply (Named p) Source # 

Associated Types

type ApplyState (Named p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState (Named p)) m => Named p wX wY -> m () Source #

Apply p => Apply (RebaseName p) Source # 

Associated Types

type ApplyState (RebaseName p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState (RebaseName p)) m => RebaseName p wX wY -> m () Source #

(PrimPatchBase p, Apply p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Apply (RebaseFixup p) Source # 

Associated Types

type ApplyState (RebaseFixup p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState (RebaseFixup p)) m => RebaseFixup p wX wY -> m () Source #

Apply p => Apply (Suspended p) Source # 

Associated Types

type ApplyState (Suspended p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState (Suspended p)) m => Suspended p wX wY -> m () Source #

PrimPatch prim => Apply (RepoPatchV2 prim) Source # 

Associated Types

type ApplyState (RepoPatchV2 prim :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState (RepoPatchV2 prim)) m => RepoPatchV2 prim wX wY -> m () Source #

(PrimPatchBase p, Invert p, Apply p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Apply (RebaseChange p) Source # 

Associated Types

type ApplyState (RebaseChange p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState (RebaseChange p)) m => RebaseChange p wX wY -> m () Source #

(PrimPatchBase p, Invert p, Apply p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Apply (RebaseSelect p) Source # 

Associated Types

type ApplyState (RebaseSelect p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState (RebaseSelect p)) m => RebaseSelect p wX wY -> m () Source #

Apply p => Apply (WrappedNamed rt p) Source # 

Associated Types

type ApplyState (WrappedNamed rt p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState (WrappedNamed rt p)) m => WrappedNamed rt p wX wY -> m () Source #

Apply p => Apply (PatchInfoAnd rt p) Source # 

Associated Types

type ApplyState (PatchInfoAnd rt p :: * -> * -> *) :: (* -> *) -> * Source #

Methods

apply :: ApplyMonad (ApplyState (PatchInfoAnd rt p)) m => PatchInfoAnd rt p wX wY -> m () Source #

class Commute p where Source #

Commute represents things that can be (possibly) commuted.

Minimal complete definition

commute

Methods

commute :: (p :> p) wX wY -> Maybe ((p :> p) wX wY) Source #

Instances

Commute DummyPatch Source # 
Commute p => Commute (RL p) Source # 

Methods

commute :: (RL p :> RL p) wX wY -> Maybe ((RL p :> RL p) wX wY) Source #

Commute p => Commute (FL p) Source # 

Methods

commute :: (FL p :> FL p) wX wY -> Maybe ((FL p :> FL p) wX wY) Source #

Commute p => Commute (Named p) Source # 

Methods

commute :: (Named p :> Named p) wX wY -> Maybe ((Named p :> Named p) wX wY) Source #

Commute (RebaseName p) Source # 

Methods

commute :: (RebaseName p :> RebaseName p) wX wY -> Maybe ((RebaseName p :> RebaseName p) wX wY) Source #

PrimPatchBase p => Commute (RebaseFixup p) Source # 

Methods

commute :: (RebaseFixup p :> RebaseFixup p) wX wY -> Maybe ((RebaseFixup p :> RebaseFixup p) wX wY) Source #

PrimPatch prim => Commute (RepoPatchV2 prim) Source # 

Methods

commute :: (RepoPatchV2 prim :> RepoPatchV2 prim) wX wY -> Maybe ((RepoPatchV2 prim :> RepoPatchV2 prim) wX wY) Source #

Commute p => Commute (LabelledPatch p) Source # 
Commute (RebaseChange p) Source # 

Methods

commute :: (RebaseChange p :> RebaseChange p) wX wY -> Maybe ((RebaseChange p :> RebaseChange p) wX wY) Source #

(PrimPatchBase p, FromPrim p, Effect p, Commute p, Invert p) => Commute (RebaseSelect p) Source # 

Methods

commute :: (RebaseSelect p :> RebaseSelect p) wX wY -> Maybe ((RebaseSelect p :> RebaseSelect p) wX wY) Source #

Commute p => Commute (WrappedNamed rt p) Source # 

Methods

commute :: (WrappedNamed rt p :> WrappedNamed rt p) wX wY -> Maybe ((WrappedNamed rt p :> WrappedNamed rt p) wX wY) Source #

Commute p => Commute (PatchInfoAnd rt p) Source # 

Methods

commute :: (PatchInfoAnd rt p :> PatchInfoAnd rt p) wX wY -> Maybe ((PatchInfoAnd rt p :> PatchInfoAnd rt p) wX wY) Source #

class Invert p where Source #

Minimal complete definition

invert

Methods

invert :: p wX wY -> p wY wX Source #

Instances

Invert Prim Source # 

Methods

invert :: Prim wX wY -> Prim wY wX Source #

Invert Prim Source # 

Methods

invert :: Prim wX wY -> Prim wY wX Source #

Invert DummyPatch Source # 

Methods

invert :: DummyPatch wX wY -> DummyPatch wY wX Source #

Invert p => Invert (RL p) Source # 

Methods

invert :: RL p wX wY -> RL p wY wX Source #

Invert p => Invert (FL p) Source # 

Methods

invert :: FL p wX wY -> FL p wY wX Source #

Invert p => Invert (Named p) Source # 

Methods

invert :: Named p wX wY -> Named p wY wX Source #

Invert (RebaseName p) Source # 

Methods

invert :: RebaseName p wX wY -> RebaseName p wY wX Source #

Invert (PrimOf p) => Invert (RebaseFixup p) Source # 

Methods

invert :: RebaseFixup p wX wY -> RebaseFixup p wY wX Source #

Invert prim => Invert (RepoPatchV2 prim) Source # 

Methods

invert :: RepoPatchV2 prim wX wY -> RepoPatchV2 prim wY wX Source #

Invert p => Invert (LabelledPatch p) Source # 

Methods

invert :: LabelledPatch p wX wY -> LabelledPatch p wY wX Source #

Invert (RebaseChange p) Source # 

Methods

invert :: RebaseChange p wX wY -> RebaseChange p wY wX Source #

Invert p => Invert (RebaseSelect p) Source # 

Methods

invert :: RebaseSelect p wX wY -> RebaseSelect p wY wX Source #

Invert p => Invert (WrappedNamed rt p) Source # 

Methods

invert :: WrappedNamed rt p wX wY -> WrappedNamed rt p wY wX Source #

Invert p => Invert (PatchInfoAnd rt p) Source # 

Methods

invert :: PatchInfoAnd rt p wX wY -> PatchInfoAnd rt p wY wX Source #

class PatchInspect p where Source #

Minimal complete definition

listTouchedFiles, hunkMatches

Methods

listTouchedFiles :: p wX wY -> [FilePath] Source #

hunkMatches :: (ByteString -> Bool) -> p wX wY -> Bool Source #

Instances

PatchInspect Prim Source # 

Methods

listTouchedFiles :: Prim wX wY -> [FilePath] Source #

hunkMatches :: (ByteString -> Bool) -> Prim wX wY -> Bool Source #

PatchInspect Prim Source # 

Methods

listTouchedFiles :: Prim wX wY -> [FilePath] Source #

hunkMatches :: (ByteString -> Bool) -> Prim wX wY -> Bool Source #

PatchInspect DummyPatch Source # 
PatchInspect p => PatchInspect (RL p) Source # 

Methods

listTouchedFiles :: RL p wX wY -> [FilePath] Source #

hunkMatches :: (ByteString -> Bool) -> RL p wX wY -> Bool Source #

PatchInspect p => PatchInspect (FL p) Source # 

Methods

listTouchedFiles :: FL p wX wY -> [FilePath] Source #

hunkMatches :: (ByteString -> Bool) -> FL p wX wY -> Bool Source #

PatchInspect p => PatchInspect (Named p) Source # 

Methods

listTouchedFiles :: Named p wX wY -> [FilePath] Source #

hunkMatches :: (ByteString -> Bool) -> Named p wX wY -> Bool Source #

PatchInspect (RebaseName p) Source # 
PatchInspect (PrimOf p) => PatchInspect (RebaseFixup p) Source # 
(PrimPatchBase p, PatchInspect p) => PatchInspect (RebaseItem p) Source # 
(PrimPatchBase p, PatchInspect p) => PatchInspect (Suspended p) Source # 
PatchInspect prim => PatchInspect (RepoPatchV2 prim) Source # 

Methods

listTouchedFiles :: RepoPatchV2 prim wX wY -> [FilePath] Source #

hunkMatches :: (ByteString -> Bool) -> RepoPatchV2 prim wX wY -> Bool Source #

PatchInspect p => PatchInspect (LabelledPatch p) Source # 
(PrimPatchBase p, PatchInspect p) => PatchInspect (RebaseChange p) Source # 
(PrimPatchBase p, PatchInspect p) => PatchInspect (RebaseSelect p) Source # 
PatchInspect p => PatchInspect (WrappedNamed rt p) Source # 

Methods

listTouchedFiles :: WrappedNamed rt p wX wY -> [FilePath] Source #

hunkMatches :: (ByteString -> Bool) -> WrappedNamed rt p wX wY -> Bool Source #

PatchInspect p => PatchInspect (PatchInfoAnd rt p) Source # 

Methods

listTouchedFiles :: PatchInfoAnd rt p wX wY -> [FilePath] Source #

hunkMatches :: (ByteString -> Bool) -> PatchInfoAnd rt p wX wY -> Bool Source #

class ReadPatch p where Source #

Minimal complete definition

readPatch'

Methods

readPatch' :: ParserM m => m (Sealed (p wX)) Source #

Instances

ReadPatch DummyPatch Source # 

Methods

readPatch' :: ParserM m => m (Sealed (DummyPatch wX)) Source #

(ReadPatch p, PatchListFormat p) => ReadPatch (RL p) Source # 

Methods

readPatch' :: ParserM m => m (Sealed (RL p wX)) Source #

(ReadPatch p, PatchListFormat p) => ReadPatch (FL p) Source # 

Methods

readPatch' :: ParserM m => m (Sealed (FL p wX)) Source #

ReadPatch p => ReadPatch (Bracketed p) Source # 

Methods

readPatch' :: ParserM m => m (Sealed (Bracketed p wX)) Source #

(ReadPatch p, PatchListFormat p) => ReadPatch (Named p) Source # 

Methods

readPatch' :: ParserM m => m (Sealed (Named p wX)) Source #

ReadPatch (RebaseName p) Source # 

Methods

readPatch' :: ParserM m => m (Sealed (RebaseName p wX)) Source #

(PrimPatchBase p, PatchListFormat p, ReadPatch p) => ReadPatch (RebaseItem p) Source # 

Methods

readPatch' :: ParserM m => m (Sealed (RebaseItem p wX)) Source #

(PrimPatchBase p, PatchListFormat p, ReadPatch p) => ReadPatch (Suspended p) Source # 

Methods

readPatch' :: ParserM m => m (Sealed (Suspended p wX)) Source #

PrimPatch prim => ReadPatch (RepoPatchV2 prim) Source # 

Methods

readPatch' :: ParserM m => m (Sealed (RepoPatchV2 prim wX)) Source #

ReadPatch (RebaseChange p) Source # 

Methods

readPatch' :: ParserM m => m (Sealed (RebaseChange p wX)) Source #

ReadPatch p => ReadPatch (RebaseSelect p) Source # 

Methods

readPatch' :: ParserM m => m (Sealed (RebaseSelect p wX)) Source #

(ReadPatch p, PrimPatchBase p, FromPrim p, Effect p, PatchListFormat p, IsRepoType rt) => ReadPatch (WrappedNamed rt p) Source # 

Methods

readPatch' :: ParserM m => m (Sealed (WrappedNamed rt p wX)) Source #

(ReadPatch p, PatchListFormat p, PrimPatchBase p, Effect p, FromPrim p, IsRepoType rt) => ReadPatch (PatchInfoAnd rt p) Source # 

Methods

readPatch' :: ParserM m => m (Sealed (PatchInfoAnd rt p wX)) Source #

showPatch :: ShowPatchBasic p => p wX wY -> Doc Source #

class ShowPatchBasic p => ShowPatch p where Source #

Minimal complete definition

summary, summaryFL

Methods

showNicely :: p wX wY -> Doc Source #

showContextPatch :: (Monad m, ApplyMonad (ApplyState p) m) => p wX wY -> m Doc Source #

showContextPatch is used to add context to a patch, as diff -u does. Thus, it differs from showPatch only for hunks. It is used for instance before putting it into a bundle. As this unified context is not included in patch representation, this requires access to the tree.

description :: p wX wY -> Doc Source #

summary :: p wX wY -> Doc Source #

summaryFL :: FL p wX wY -> Doc Source #

thing :: p wX wY -> String Source #

things :: p wX wY -> String Source #

Instances

ShowPatch DummyPatch Source # 
(Apply p, CommuteNoConflicts p, Conflict p, IsHunk p, PatchListFormat p, PrimPatchBase p, ShowPatch p) => ShowPatch (Named p) Source # 

Methods

showNicely :: Named p wX wY -> Doc Source #

showContextPatch :: (Monad m, ApplyMonad (ApplyState (Named p)) m) => Named p wX wY -> m Doc Source #

description :: Named p wX wY -> Doc Source #

summary :: Named p wX wY -> Doc Source #

summaryFL :: FL (Named p) wX wY -> Doc Source #

thing :: Named p wX wY -> String Source #

things :: Named p wX wY -> String Source #

ShowPatch (RebaseName p) Source # 
(PrimPatchBase p, PatchListFormat p, Apply p, CommuteNoConflicts p, Conflict p, IsHunk p, ShowPatch p) => ShowPatch (RebaseItem p) Source # 
(PrimPatchBase p, PatchListFormat p, Apply p, CommuteNoConflicts p, Conflict p, IsHunk p, ShowPatch p) => ShowPatch (Suspended p) Source # 
PrimPatch prim => ShowPatch (RepoPatchV2 prim) Source # 

Methods

showNicely :: RepoPatchV2 prim wX wY -> Doc Source #

showContextPatch :: (Monad m, ApplyMonad (ApplyState (RepoPatchV2 prim)) m) => RepoPatchV2 prim wX wY -> m Doc Source #

description :: RepoPatchV2 prim wX wY -> Doc Source #

summary :: RepoPatchV2 prim wX wY -> Doc Source #

summaryFL :: FL (RepoPatchV2 prim) wX wY -> Doc Source #

thing :: RepoPatchV2 prim wX wY -> String Source #

things :: RepoPatchV2 prim wX wY -> String Source #

(PrimPatchBase p, PatchListFormat p, ShowPatchBasic p, Invert p, Effect p, Merge p, FromPrim p, Conflict p, CommuteNoConflicts p) => ShowPatch (RebaseChange p) Source # 
(PrimPatchBase p, PatchListFormat p, Apply p, CommuteNoConflicts p, Conflict p, IsHunk p, ShowPatch p) => ShowPatch (RebaseSelect p) Source # 
(ShowPatch p, PatchListFormat p, Apply p, PrimPatchBase p, IsHunk p, Conflict p, CommuteNoConflicts p) => ShowPatch (WrappedNamed rt p) Source # 

Methods

showNicely :: WrappedNamed rt p wX wY -> Doc Source #

showContextPatch :: (Monad m, ApplyMonad (ApplyState (WrappedNamed rt p)) m) => WrappedNamed rt p wX wY -> m Doc Source #

description :: WrappedNamed rt p wX wY -> Doc Source #

summary :: WrappedNamed rt p wX wY -> Doc Source #

summaryFL :: FL (WrappedNamed rt p) wX wY -> Doc Source #

thing :: WrappedNamed rt p wX wY -> String Source #

things :: WrappedNamed rt p wX wY -> String Source #

(Apply p, Conflict p, CommuteNoConflicts p, IsHunk p, PatchListFormat p, PrimPatchBase p, ShowPatch p, (~) ((* -> *) -> *) (ApplyState p) Tree) => ShowPatch (PatchInfoAnd rt p) Source # 

Methods

showNicely :: PatchInfoAnd rt p wX wY -> Doc Source #

showContextPatch :: (Monad m, ApplyMonad (ApplyState (PatchInfoAnd rt p)) m) => PatchInfoAnd rt p wX wY -> m Doc Source #

description :: PatchInfoAnd rt p wX wY -> Doc Source #

summary :: PatchInfoAnd rt p wX wY -> Doc Source #

summaryFL :: FL (PatchInfoAnd rt p) wX wY -> Doc Source #

thing :: PatchInfoAnd rt p wX wY -> String Source #

things :: PatchInfoAnd rt p wX wY -> String Source #