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

Safe HaskellNone
LanguageHaskell2010

Darcs.Patch.Show

Synopsis

Documentation

class ShowPatchBasic p where Source #

Minimal complete definition

showPatch

Methods

showPatch :: ShowPatchFor -> p wX wY -> Doc Source #

Instances

ShowPatchBasic Prim Source # 

Methods

showPatch :: ShowPatchFor -> Prim wX wY -> Doc Source #

ShowPatchBasic Prim Source # 

Methods

showPatch :: ShowPatchFor -> Prim wX wY -> Doc Source #

ShowPatchBasic DummyPatch Source # 
(PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (Named p) Source # 

Methods

showPatch :: ShowPatchFor -> Named p wX wY -> Doc Source #

ShowPatchBasic (RebaseName p) Source # 

Methods

showPatch :: ShowPatchFor -> RebaseName p wX wY -> Doc Source #

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

Methods

showPatch :: ShowPatchFor -> RebaseItem p wX wY -> Doc Source #

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

Methods

showPatch :: ShowPatchFor -> Suspended p wX wY -> Doc Source #

(PrimPatchBase p, ShowPatchBasic p) => ShowPatchBasic (RebaseChange p) Source # 

Methods

showPatch :: ShowPatchFor -> RebaseChange p wX wY -> Doc Source #

(PrimPatchBase p, PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (RebaseSelect p) Source # 

Methods

showPatch :: ShowPatchFor -> RebaseSelect p wX wY -> Doc Source #

PrimPatch prim => ShowPatchBasic (RepoPatchV2 prim) Source # 

Methods

showPatch :: ShowPatchFor -> RepoPatchV2 prim wX wY -> Doc Source #

(ShowPatchBasic p, PatchListFormat p) => ShowPatchBasic (WrappedNamed rt p) Source # 

Methods

showPatch :: ShowPatchFor -> WrappedNamed rt p wX wY -> Doc Source #

(PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (PatchInfoAnd rt p) Source # 

Methods

showPatch :: ShowPatchFor -> PatchInfoAnd rt p wX wY -> Doc Source #

class ShowPatchBasic p => ShowPatch p where Source #

Minimal complete definition

summary

Methods

showNicely :: p wX wY -> Doc Source #

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 Prim Source # 

Methods

showNicely :: Prim wX wY -> Doc Source #

description :: Prim wX wY -> Doc Source #

summary :: Prim wX wY -> Doc Source #

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

thing :: Prim wX wY -> String Source #

things :: Prim wX wY -> String Source #

ShowPatch Prim Source # 

Methods

showNicely :: Prim wX wY -> Doc Source #

description :: Prim wX wY -> Doc Source #

summary :: Prim wX wY -> Doc Source #

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

thing :: Prim wX wY -> String Source #

things :: Prim wX wY -> String Source #

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

Methods

showNicely :: Named p wX wY -> 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 # 

Methods

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

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

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

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

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

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

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

Methods

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

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

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

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

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

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

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

Methods

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

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

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

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

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

things :: Suspended p 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 # 
PrimPatch prim => ShowPatch (RepoPatchV2 prim) Source # 

Methods

showNicely :: RepoPatchV2 prim wX wY -> 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 #

(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 #

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 #

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 #

class ShowPatchBasic p => ShowContextPatch p where Source #

Minimal complete definition

showContextPatch

Methods

showContextPatch :: ApplyMonad (ApplyState p) m => ShowPatchFor -> 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.

Instances

ShowContextPatch Prim Source # 
ShowContextPatch Prim Source # 
ShowContextPatch DummyPatch Source # 
(Apply p, IsHunk p, PatchListFormat p, ShowContextPatch p) => ShowContextPatch (Named p) Source # 
(PrimPatchBase p, ShowPatchBasic p) => ShowContextPatch (RebaseChange p) Source # 
(PrimPatchBase p, PatchListFormat p, ShowPatchBasic p) => ShowContextPatch (RebaseSelect p) Source # 
PrimPatch prim => ShowContextPatch (RepoPatchV2 prim) Source # 
(ShowContextPatch p, PatchListFormat p, Apply p, PrimPatchBase p, IsHunk p) => ShowContextPatch (WrappedNamed rt p) Source # 
(Apply p, IsHunk p, PatchListFormat p, PrimPatchBase p, ShowContextPatch p) => ShowContextPatch (PatchInfoAnd rt p) Source # 

formatFileName :: FileNameFormat -> FileName -> Doc Source #

Format a FileName to a Doc according to the given FileNameFormat.

NOTE: This is not only used for display but also to format patch files. This is why we have to do the white space encoding here. See writePatchIfNecessary.

Besides white space encoding, for NewFormat we just pack it into a Doc. For OldFormat we must emulate the non-standard darcs-1 encoding of file paths: it is an UTF8 encoding of the raw byte stream, interpreted as code points.

See also readFileName.