Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class ShowPatchBasic p where
- displayPatch :: ShowPatchBasic p => p wX wY -> Doc
- data ShowPatchFor
- class ShowPatchBasic p => ShowPatch p where
- class ShowPatchBasic p => ShowContextPatch p where
- formatFileName :: FileNameFormat -> FileName -> Doc
Documentation
class ShowPatchBasic p where Source #
showPatch :: ShowPatchFor -> p wX wY -> Doc Source #
ShowPatchBasic Prim Source # | |
ShowPatchBasic Prim Source # | |
ShowPatchBasic DummyPatch Source # | |
(PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (Named p) Source # | |
ShowPatchBasic (RebaseName p) Source # | |
(PrimPatchBase p, PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (RebaseItem p) Source # | |
(PrimPatchBase p, PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (Suspended p) Source # | |
(PrimPatchBase p, ShowPatchBasic p) => ShowPatchBasic (RebaseChange p) Source # | |
(PrimPatchBase p, PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (RebaseSelect p) Source # | |
PrimPatch prim => ShowPatchBasic (RepoPatchV2 prim) Source # | |
(ShowPatchBasic p, PatchListFormat p) => ShowPatchBasic (WrappedNamed rt p) Source # | |
(PatchListFormat p, ShowPatchBasic p) => ShowPatchBasic (PatchInfoAnd rt p) Source # | |
displayPatch :: ShowPatchBasic p => p wX wY -> Doc Source #
class ShowPatchBasic p => ShowPatch p where Source #
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 #
class ShowPatchBasic p => ShowContextPatch p where Source #
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.
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
.