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

Safe HaskellNone
LanguageHaskell2010

Darcs.Patch.Show

Synopsis

Documentation

class ShowPatchBasic p where Source #

Methods

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

Instances
ShowPatchBasic Prim Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Show

Methods

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

ShowPatchBasic RebaseName Source # 
Instance details

Defined in Darcs.Patch.Rebase.Name

ShowPatchBasic Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

Methods

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

ShowPatchBasic Prim Source # 
Instance details

Defined in Darcs.Patch.V1.Prim

Methods

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

(PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (RL p) Source # 
Instance details

Defined in Darcs.Patch.Viewing

Methods

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

(PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (FL p) Source # 
Instance details

Defined in Darcs.Patch.Viewing

Methods

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

ShowPatchBasic p => ShowPatchBasic (Bracketed p) Source # 
Instance details

Defined in Darcs.Patch.Bracketed

Methods

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

ShowPatchBasic prim => ShowPatchBasic (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Show

Methods

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

(PatchListFormat prim, ShowPatchBasic prim) => ShowPatchBasic (Unwound prim) Source # 
Instance details

Defined in Darcs.Patch.Unwind

Methods

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

PrimPatch prim => ShowPatchBasic (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

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

(PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Methods

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

ShowPatchBasic prim => ShowPatchBasic (RebaseFixup prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Fixup

Methods

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

(ShowPatchBasic prim, Invert prim, PatchListFormat prim) => ShowPatchBasic (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

Methods

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

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

Defined in Darcs.Patch.Rebase.Suspended

Methods

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

ShowPatchBasic p => ShowPatchBasic (Invertible p) Source # 
Instance details

Defined in Darcs.Patch.Invertible

Methods

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

ShowPatchBasic p => ShowPatchBasic (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

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

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

Defined in Darcs.Patch.Named.Wrapped

Methods

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

(StorableId name, ShowPatchBasic p) => ShowPatchBasic (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

Methods

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

(StorableId name, PrimPatch prim) => ShowPatchBasic (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

showPatch :: ShowPatchFor -> RepoPatchV3 name prim wX wY -> Doc Source #

class ShowPatchBasic p => ShowPatch p where Source #

This class is used only for user interaction, not for storage. The default implementations for description and content are suitable only for PrimPatch and RepoPatch types. Logically, description should default to mempty while content should default to displayPatch. We define them the other way around so that showFriendly gives reasonable results for all patch types.

Minimal complete definition

summary

Methods

content :: 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 # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Show

Methods

content :: 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 RebaseName Source # 
Instance details

Defined in Darcs.Patch.Rebase.Name

ShowPatch Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

Methods

content :: 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 # 
Instance details

Defined in Darcs.Patch.V1.Prim

Methods

content :: 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 #

(PatchListFormat p, ShowPatch p) => ShowPatch (RL p) Source # 
Instance details

Defined in Darcs.Patch.Viewing

Methods

content :: RL p wX wY -> Doc Source #

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

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

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

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

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

(PatchListFormat p, ShowPatch p) => ShowPatch (FL p) Source # 
Instance details

Defined in Darcs.Patch.Viewing

Methods

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

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

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

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

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

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

PrimPatch prim => ShowPatch (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Viewing

Methods

content :: RepoPatchV1 prim wX wY -> Doc Source #

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

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

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

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

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

PrimPatch prim => ShowPatch (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

Methods

content :: 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 #

(Summary p, PatchListFormat p, PrimPatchBase p, ShowPatch p) => ShowPatch (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

Methods

content :: 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 #

PrimPatch prim => ShowPatch (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

Methods

content :: RebaseChange prim wX wY -> Doc Source #

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

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

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

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

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

ShowPatch p => ShowPatch (Invertible p) Source # 
Instance details

Defined in Darcs.Patch.Invertible

Methods

content :: Invertible p wX wY -> Doc Source #

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

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

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

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

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

(Summary p, PatchListFormat p, ShowPatch p) => ShowPatch (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

Methods

content :: PatchInfoAndG rt p wX wY -> Doc Source #

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

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

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

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

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

(StorableId name, PrimDetails p, ShowPatchBasic p) => ShowPatch (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

Methods

content :: PrimWithName name p wX wY -> Doc Source #

description :: PrimWithName name p wX wY -> Doc Source #

summary :: PrimWithName name p wX wY -> Doc Source #

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

thing :: PrimWithName name p wX wY -> String Source #

things :: PrimWithName name p wX wY -> String Source #

(SignedId name, StorableId name, PrimPatch prim) => ShowPatch (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

content :: RepoPatchV3 name prim wX wY -> Doc Source #

description :: RepoPatchV3 name prim wX wY -> Doc Source #

summary :: RepoPatchV3 name prim wX wY -> Doc Source #

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

thing :: RepoPatchV3 name prim wX wY -> String Source #

things :: RepoPatchV3 name prim wX wY -> String Source #

class ShowPatchBasic p => ShowContextPatch p where Source #

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 # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Show

ShowContextPatch Prim Source # 
Instance details

Defined in Darcs.Patch.V2.Prim

ShowContextPatch Prim Source # 
Instance details

Defined in Darcs.Patch.V1.Prim

(ShowContextPatch p, Apply p, IsHunk p, PatchListFormat p) => ShowContextPatch (RL p) Source # 
Instance details

Defined in Darcs.Patch.Viewing

Methods

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

(Apply p, IsHunk p, PatchListFormat p, ShowContextPatch p) => ShowContextPatch (FL p) Source # 
Instance details

Defined in Darcs.Patch.Viewing

Methods

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

PrimPatch prim => ShowContextPatch (RepoPatchV1 prim) Source # 
Instance details

Defined in Darcs.Patch.V1.Viewing

PrimPatch prim => ShowContextPatch (RepoPatchV2 prim) Source # 
Instance details

Defined in Darcs.Patch.V2.RepoPatch

(Apply p, IsHunk p, PatchListFormat p, ShowContextPatch p) => ShowContextPatch (Named p) Source # 
Instance details

Defined in Darcs.Patch.Named

(ShowPatchBasic prim, Invert prim, PatchListFormat prim) => ShowContextPatch (RebaseChange prim) Source # 
Instance details

Defined in Darcs.Patch.Rebase.Change

ShowContextPatch p => ShowContextPatch (Invertible p) Source # 
Instance details

Defined in Darcs.Patch.Invertible

ShowContextPatch p => ShowContextPatch (PatchInfoAndG rt p) Source # 
Instance details

Defined in Darcs.Patch.PatchInfoAnd

(StorableId name, ShowContextPatch p) => ShowContextPatch (PrimWithName name p) Source # 
Instance details

Defined in Darcs.Patch.Prim.WithName

Methods

showContextPatch :: ApplyMonad (ApplyState (PrimWithName name p)) m => ShowPatchFor -> PrimWithName name p wX wY -> m Doc Source #

(StorableId name, PrimPatch prim) => ShowContextPatch (RepoPatchV3 name prim) Source # 
Instance details

Defined in Darcs.Patch.V3.Core

Methods

showContextPatch :: ApplyMonad (ApplyState (RepoPatchV3 name prim)) m => ShowPatchFor -> RepoPatchV3 name prim wX wY -> m Doc Source #

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

Format a AnchoredPath 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 FileNameFormatV2 we just pack it into a Doc. For FileNameFormatV1 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.