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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Patchy

Synopsis

- class (Apply p, Commute p, Invert p) => Patchy p
- class Apply p where
  - type ApplyState p :: (* -> *) -> *
- class Commute p where
- class Invert p where
- class PatchInspect p where
- class ReadPatch p where
- showPatch :: ShowPatchBasic p => p wX wY -> Doc
- class ShowPatchBasic p => ShowPatch p where

# Documentation

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

Instances

Patchy DummyPatch # |
Apply p => Patchy (RebaseName p) # |
PrimPatch prim => Patchy (RepoPatchV2 prim) # |
(PrimPatchBase p, Apply p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p)), Invert p) => Patchy (RebaseChange p) # |
(PrimPatchBase p, PatchListFormat p, Conflict p, FromPrim p, Effect p, CommuteNoConflicts p, IsHunk p, Patchy p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Patchy (RebaseSelect p) # |
(Patchy p, (~) ((* -> *) -> *) (ApplyState p) Tree) => Patchy (PatchInfoAnd rt p) # |

class Apply p where #

Minimal complete definition

apply

Associated Types

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

Methods

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

Instances

Apply DummyPatch # |
Associated Types type ApplyState (DummyPatch :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState DummyPatch) m => DummyPatch wX wY -> m () #
Apply p => Apply (RL p) # |
Associated Types type ApplyState (RL p :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (RL p)) m => RL p wX wY -> m () #
Apply p => Apply (FL p) # |
Associated Types type ApplyState (FL p :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (FL p)) m => FL p wX wY -> m () #
Apply p => Apply (Named p) # |
Associated Types type ApplyState (Named p :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (Named p)) m => Named p wX wY -> m () #
Apply p => Apply (RebaseName p) # |
Associated Types type ApplyState (RebaseName p :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (RebaseName p)) m => RebaseName p wX wY -> m () #
(PrimPatchBase p, Apply p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Apply (RebaseFixup p) # |
Associated Types type ApplyState (RebaseFixup p :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (RebaseFixup p)) m => RebaseFixup p wX wY -> m () #
Apply p => Apply (Suspended p) # |
Associated Types type ApplyState (Suspended p :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (Suspended p)) m => Suspended p wX wY -> m () #
PrimPatch prim => Apply (RepoPatchV2 prim) # |
Associated Types type ApplyState (RepoPatchV2 prim :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (RepoPatchV2 prim)) m => RepoPatchV2 prim wX wY -> m () #
(PrimPatchBase p, Invert p, Apply p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Apply (RebaseChange p) # |
Associated Types type ApplyState (RebaseChange p :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (RebaseChange p)) m => RebaseChange p wX wY -> m () #
(PrimPatchBase p, Invert p, Apply p, (~) ((* -> *) -> *) (ApplyState p) (ApplyState (PrimOf p))) => Apply (RebaseSelect p) # |
Associated Types type ApplyState (RebaseSelect p :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (RebaseSelect p)) m => RebaseSelect p wX wY -> m () #
Apply p => Apply (WrappedNamed rt p) # |
Associated Types type ApplyState (WrappedNamed rt p :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (WrappedNamed rt p)) m => WrappedNamed rt p wX wY -> m () #
Apply p => Apply (PatchInfoAnd rt p) # |
Associated Types type ApplyState (PatchInfoAnd rt p :: * -> * -> *) :: (* -> *) -> * # Methods apply :: ApplyMonad (ApplyState (PatchInfoAnd rt p)) m => PatchInfoAnd rt p wX wY -> m () #

class Commute p where #

Commute represents things that can be (possibly) commuted.

Minimal complete definition

commute

Methods

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

Instances

Commute DummyPatch # |
Methods commute :: (DummyPatch :> DummyPatch) wX wY -> Maybe ((DummyPatch :> DummyPatch) wX wY) #
Commute p => Commute (RL p) # |
Methods commute :: (RL p :> RL p) wX wY -> Maybe ((RL p :> RL p) wX wY) #
Commute p => Commute (FL p) # |
Methods commute :: (FL p :> FL p) wX wY -> Maybe ((FL p :> FL p) wX wY) #
Commute p => Commute (Named p) # |
Methods commute :: (Named p :> Named p) wX wY -> Maybe ((Named p :> Named p) wX wY) #
Commute (RebaseName p) # |
Methods commute :: (RebaseName p :> RebaseName p) wX wY -> Maybe ((RebaseName p :> RebaseName p) wX wY) #
PrimPatchBase p => Commute (RebaseFixup p) # |
Methods commute :: (RebaseFixup p :> RebaseFixup p) wX wY -> Maybe ((RebaseFixup p :> RebaseFixup p) wX wY) #
PrimPatch prim => Commute (RepoPatchV2 prim) # |
Methods commute :: (RepoPatchV2 prim :> RepoPatchV2 prim) wX wY -> Maybe ((RepoPatchV2 prim :> RepoPatchV2 prim) wX wY) #
Commute p => Commute (LabelledPatch p) # |
Methods commute :: (LabelledPatch p :> LabelledPatch p) wX wY -> Maybe ((LabelledPatch p :> LabelledPatch p) wX wY) #
Commute (RebaseChange p) # |
Methods commute :: (RebaseChange p :> RebaseChange p) wX wY -> Maybe ((RebaseChange p :> RebaseChange p) wX wY) #
(PrimPatchBase p, FromPrim p, Effect p, Commute p, Invert p) => Commute (RebaseSelect p) # |
Methods commute :: (RebaseSelect p :> RebaseSelect p) wX wY -> Maybe ((RebaseSelect p :> RebaseSelect p) wX wY) #
Commute p => Commute (WrappedNamed rt p) # |
Methods commute :: (WrappedNamed rt p :> WrappedNamed rt p) wX wY -> Maybe ((WrappedNamed rt p :> WrappedNamed rt p) wX wY) #
Commute p => Commute (PatchInfoAnd rt p) # |
Methods commute :: (PatchInfoAnd rt p :> PatchInfoAnd rt p) wX wY -> Maybe ((PatchInfoAnd rt p :> PatchInfoAnd rt p) wX wY) #

class Invert p where #

Minimal complete definition

invert

Methods

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

Instances

Invert Prim # |
Methods invert :: Prim wX wY -> Prim wY wX #
Invert Prim # |
Methods invert :: Prim wX wY -> Prim wY wX #
Invert DummyPatch # |
Methods invert :: DummyPatch wX wY -> DummyPatch wY wX #
Invert p => Invert (RL p) # |
Methods invert :: RL p wX wY -> RL p wY wX #
Invert p => Invert (FL p) # |
Methods invert :: FL p wX wY -> FL p wY wX #
Invert p => Invert (Named p) # |
Methods invert :: Named p wX wY -> Named p wY wX #
Invert (RebaseName p) # |
Methods invert :: RebaseName p wX wY -> RebaseName p wY wX #
Invert (PrimOf p) => Invert (RebaseFixup p) # |
Methods invert :: RebaseFixup p wX wY -> RebaseFixup p wY wX #
Invert prim => Invert (RepoPatchV2 prim) # |
Methods invert :: RepoPatchV2 prim wX wY -> RepoPatchV2 prim wY wX #
Invert p => Invert (LabelledPatch p) # |
Methods invert :: LabelledPatch p wX wY -> LabelledPatch p wY wX #
Invert (RebaseChange p) # |
Methods invert :: RebaseChange p wX wY -> RebaseChange p wY wX #
Invert p => Invert (RebaseSelect p) # |
Methods invert :: RebaseSelect p wX wY -> RebaseSelect p wY wX #
Invert p => Invert (WrappedNamed rt p) # |
Methods invert :: WrappedNamed rt p wX wY -> WrappedNamed rt p wY wX #
Invert p => Invert (PatchInfoAnd rt p) # |
Methods invert :: PatchInfoAnd rt p wX wY -> PatchInfoAnd rt p wY wX #

class PatchInspect p where #

Minimal complete definition

listTouchedFiles, hunkMatches

Methods

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

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

Instances

PatchInspect Prim # |
Methods listTouchedFiles :: Prim wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> Prim wX wY -> Bool #
PatchInspect Prim # |
Methods listTouchedFiles :: Prim wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> Prim wX wY -> Bool #
PatchInspect DummyPatch # |
Methods listTouchedFiles :: DummyPatch wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> DummyPatch wX wY -> Bool #
PatchInspect p => PatchInspect (RL p) # |
Methods listTouchedFiles :: RL p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> RL p wX wY -> Bool #
PatchInspect p => PatchInspect (FL p) # |
Methods listTouchedFiles :: FL p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> FL p wX wY -> Bool #
PatchInspect p => PatchInspect (Named p) # |
Methods listTouchedFiles :: Named p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> Named p wX wY -> Bool #
PatchInspect (RebaseName p) # |
Methods listTouchedFiles :: RebaseName p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> RebaseName p wX wY -> Bool #
PatchInspect (PrimOf p) => PatchInspect (RebaseFixup p) # |
Methods listTouchedFiles :: RebaseFixup p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> RebaseFixup p wX wY -> Bool #
(PrimPatchBase p, PatchInspect p) => PatchInspect (RebaseItem p) # |
Methods listTouchedFiles :: RebaseItem p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> RebaseItem p wX wY -> Bool #
(PrimPatchBase p, PatchInspect p) => PatchInspect (Suspended p) # |
Methods listTouchedFiles :: Suspended p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> Suspended p wX wY -> Bool #
PatchInspect prim => PatchInspect (RepoPatchV2 prim) # |
Methods listTouchedFiles :: RepoPatchV2 prim wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> RepoPatchV2 prim wX wY -> Bool #
PatchInspect p => PatchInspect (LabelledPatch p) # |
Methods listTouchedFiles :: LabelledPatch p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> LabelledPatch p wX wY -> Bool #
(PrimPatchBase p, PatchInspect p) => PatchInspect (RebaseChange p) # |
Methods listTouchedFiles :: RebaseChange p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> RebaseChange p wX wY -> Bool #
(PrimPatchBase p, PatchInspect p) => PatchInspect (RebaseSelect p) # |
Methods listTouchedFiles :: RebaseSelect p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> RebaseSelect p wX wY -> Bool #
PatchInspect p => PatchInspect (WrappedNamed rt p) # |
Methods listTouchedFiles :: WrappedNamed rt p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> WrappedNamed rt p wX wY -> Bool #
PatchInspect p => PatchInspect (PatchInfoAnd rt p) # |
Methods listTouchedFiles :: PatchInfoAnd rt p wX wY -> [FilePath] # hunkMatches :: (ByteString -> Bool) -> PatchInfoAnd rt p wX wY -> Bool #

class ReadPatch p where #

Minimal complete definition

readPatch'

Methods

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

Instances

ReadPatch DummyPatch # |
Methods readPatch' :: ParserM m => m (Sealed (DummyPatch wX)) #
(ReadPatch p, PatchListFormat p) => ReadPatch (RL p) # |
Methods readPatch' :: ParserM m => m (Sealed (RL p wX)) #
(ReadPatch p, PatchListFormat p) => ReadPatch (FL p) # |
Methods readPatch' :: ParserM m => m (Sealed (FL p wX)) #
ReadPatch p => ReadPatch (Bracketed p) # |
Methods readPatch' :: ParserM m => m (Sealed (Bracketed p wX)) #
(ReadPatch p, PatchListFormat p) => ReadPatch (Named p) # |
Methods readPatch' :: ParserM m => m (Sealed (Named p wX)) #
ReadPatch (RebaseName p) # |
Methods readPatch' :: ParserM m => m (Sealed (RebaseName p wX)) #
(PrimPatchBase p, PatchListFormat p, ReadPatch p) => ReadPatch (RebaseItem p) # |
Methods readPatch' :: ParserM m => m (Sealed (RebaseItem p wX)) #
(PrimPatchBase p, PatchListFormat p, ReadPatch p) => ReadPatch (Suspended p) # |
Methods readPatch' :: ParserM m => m (Sealed (Suspended p wX)) #
PrimPatch prim => ReadPatch (RepoPatchV2 prim) # |
Methods readPatch' :: ParserM m => m (Sealed (RepoPatchV2 prim wX)) #
ReadPatch (RebaseChange p) # |
Methods readPatch' :: ParserM m => m (Sealed (RebaseChange p wX)) #
ReadPatch p => ReadPatch (RebaseSelect p) # |
Methods readPatch' :: ParserM m => m (Sealed (RebaseSelect p wX)) #
(ReadPatch p, PrimPatchBase p, FromPrim p, Effect p, PatchListFormat p, IsRepoType rt) => ReadPatch (WrappedNamed rt p) # |
Methods readPatch' :: ParserM m => m (Sealed (WrappedNamed rt p wX)) #
(ReadPatch p, PatchListFormat p, PrimPatchBase p, Effect p, FromPrim p, IsRepoType rt) => ReadPatch (PatchInfoAnd rt p) # |
Methods readPatch' :: ParserM m => m (Sealed (PatchInfoAnd rt p wX)) #

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

class ShowPatchBasic p => ShowPatch p where #

Minimal complete definition

summary, summaryFL

Methods

showNicely :: p wX wY -> Doc #

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

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 #

summary :: p wX wY -> Doc #

summaryFL :: FL p wX wY -> Doc #

thing :: p wX wY -> String #

things :: p wX wY -> String #

Instances

ShowPatch DummyPatch # |
Methods showNicely :: DummyPatch wX wY -> Doc # showContextPatch :: (Monad m, ApplyMonad (ApplyState DummyPatch) m) => DummyPatch wX wY -> m Doc # description :: DummyPatch wX wY -> Doc # summary :: DummyPatch wX wY -> Doc # summaryFL :: FL DummyPatch wX wY -> Doc # thing :: DummyPatch wX wY -> String # things :: DummyPatch wX wY -> String #
(Apply p, CommuteNoConflicts p, Conflict p, IsHunk p, PatchListFormat p, PrimPatchBase p, ShowPatch p) => ShowPatch (Named p) # |
Methods showNicely :: Named p wX wY -> Doc # showContextPatch :: (Monad m, ApplyMonad (ApplyState (Named p)) m) => Named p wX wY -> m 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 #
ShowPatch (RebaseName p) # |
Methods showNicely :: RebaseName p wX wY -> Doc # showContextPatch :: (Monad m, ApplyMonad (ApplyState (RebaseName p)) m) => RebaseName p wX wY -> m Doc # description :: RebaseName p wX wY -> Doc # summary :: RebaseName p wX wY -> Doc # summaryFL :: FL (RebaseName p) wX wY -> Doc # thing :: RebaseName p wX wY -> String # things :: RebaseName p wX wY -> String #
(PrimPatchBase p, PatchListFormat p, Apply p, CommuteNoConflicts p, Conflict p, IsHunk p, ShowPatch p) => ShowPatch (RebaseItem p) # |
Methods showNicely :: RebaseItem p wX wY -> Doc # showContextPatch :: (Monad m, ApplyMonad (ApplyState (RebaseItem p)) m) => RebaseItem p wX wY -> m Doc # description :: RebaseItem p wX wY -> Doc # summary :: RebaseItem p wX wY -> Doc # summaryFL :: FL (RebaseItem p) wX wY -> Doc # thing :: RebaseItem p wX wY -> String # things :: RebaseItem p wX wY -> String #
(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 #
PrimPatch prim => ShowPatch (RepoPatchV2 prim) # |
Methods showNicely :: RepoPatchV2 prim wX wY -> Doc # showContextPatch :: (Monad m, ApplyMonad (ApplyState (RepoPatchV2 prim)) m) => RepoPatchV2 prim wX wY -> m Doc # description :: RepoPatchV2 prim wX wY -> Doc # summary :: RepoPatchV2 prim wX wY -> Doc # summaryFL :: FL (RepoPatchV2 prim) wX wY -> Doc # thing :: RepoPatchV2 prim wX wY -> String # things :: RepoPatchV2 prim wX wY -> String #
(PrimPatchBase p, PatchListFormat p, ShowPatchBasic p, Invert p, Effect p, Merge p, FromPrim p, Conflict p, CommuteNoConflicts p) => ShowPatch (RebaseChange p) # |
Methods showNicely :: RebaseChange p wX wY -> Doc # showContextPatch :: (Monad m, ApplyMonad (ApplyState (RebaseChange p)) m) => RebaseChange p wX wY -> m Doc # description :: RebaseChange p wX wY -> Doc # summary :: RebaseChange p wX wY -> Doc # summaryFL :: FL (RebaseChange p) wX wY -> Doc # thing :: RebaseChange p wX wY -> String # things :: RebaseChange p wX wY -> String #
(PrimPatchBase p, PatchListFormat p, Apply p, CommuteNoConflicts p, Conflict p, IsHunk p, ShowPatch p) => ShowPatch (RebaseSelect p) # |
Methods showNicely :: RebaseSelect p wX wY -> Doc # showContextPatch :: (Monad m, ApplyMonad (ApplyState (RebaseSelect p)) m) => RebaseSelect p wX wY -> m Doc # description :: RebaseSelect p wX wY -> Doc # summary :: RebaseSelect p wX wY -> Doc # summaryFL :: FL (RebaseSelect p) wX wY -> Doc # thing :: RebaseSelect p wX wY -> String # things :: RebaseSelect p wX wY -> String #
(ShowPatch p, PatchListFormat p, Apply p, PrimPatchBase p, IsHunk p, Conflict p, CommuteNoConflicts p) => ShowPatch (WrappedNamed rt p) # |
Methods showNicely :: WrappedNamed rt p wX wY -> Doc # showContextPatch :: (Monad m, ApplyMonad (ApplyState (WrappedNamed rt p)) m) => WrappedNamed rt p wX wY -> m Doc # description :: WrappedNamed rt p wX wY -> Doc # summary :: WrappedNamed rt p wX wY -> Doc # summaryFL :: FL (WrappedNamed rt p) wX wY -> Doc # thing :: WrappedNamed rt p wX wY -> String # things :: WrappedNamed rt p wX wY -> String #
(Apply p, Conflict p, CommuteNoConflicts p, IsHunk p, PatchListFormat p, PrimPatchBase p, ShowPatch p, (~) ((* -> *) -> *) (ApplyState p) Tree) => ShowPatch (PatchInfoAnd rt p) # |
Methods showNicely :: PatchInfoAnd rt p wX wY -> Doc # showContextPatch :: (Monad m, ApplyMonad (ApplyState (PatchInfoAnd rt p)) m) => PatchInfoAnd rt p wX wY -> m Doc # description :: PatchInfoAnd rt p wX wY -> Doc # summary :: PatchInfoAnd rt p wX wY -> Doc # summaryFL :: FL (PatchInfoAnd rt p) wX wY -> Doc # thing :: PatchInfoAnd rt p wX wY -> String # things :: PatchInfoAnd rt p wX wY -> String #