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

Safe Haskell | Safe
Language | Haskell2010

Darcs.Patch.Format

Synopsis

- class PatchListFormat p where
- data ListFormat p
  - = ListFormatDefault
  - | ListFormatV1
  - | ListFormatV2
- copyListFormat :: ListFormat p -> ListFormat q
- data FileNameFormat
  - = OldFormat
  - | NewFormat

# Documentation

class PatchListFormat p where #

Showing and reading lists of patches. This class allows us to control how lists of patches are formatted on disk. For legacy reasons V1 patches have their own special treatment (see `ListFormat`). Other patch types use the default format which just puts them in a sequence without separators or any prelude/epilogue.

This means that 'FL (FL p)' etc would be ambiguous, so there are no instances for 'FL p' or other list types.

Methods

patchListFormat :: ListFormat p #

Instances

PatchListFormat DummyPatch # |
Methods patchListFormat :: ListFormat DummyPatch #
PatchListFormat (Bracketed p) # |
Methods patchListFormat :: ListFormat (Bracketed p) #
PatchListFormat (RepoPatchV1 prim) # |
Methods patchListFormat :: ListFormat (RepoPatchV1 prim) #
PatchListFormat (Named p) # |
Methods patchListFormat :: ListFormat (Named p) #
PatchListFormat (RepoPatchV2 prim) # |
Methods patchListFormat :: ListFormat (RepoPatchV2 prim) #
PatchListFormat (RebaseChange p) # |
Methods patchListFormat :: ListFormat (RebaseChange p) #
PatchListFormat (WrappedNamed rt p) # |
Methods patchListFormat :: ListFormat (WrappedNamed rt p) #
PatchListFormat (PatchInfoAnd rt p) # |
Methods patchListFormat :: ListFormat (PatchInfoAnd rt p) #

data ListFormat p #

This type is used to tweak the way that lists of `p` are shown for a given `Patch` type `p`. It is needed to maintain backwards compatibility for V1 and V2 patches.

Constructors

ListFormatDefault | Show and read lists without braces.
ListFormatV1 | Show lists with a single layer of braces around the outside, except for singletons which have no braces. Read with arbitrary nested braces and parens and flatten them out.
ListFormatV2 | Show lists without braces. Read with arbitrary nested parens and flatten them out.

copyListFormat :: ListFormat p -> ListFormat q #

data FileNameFormat #

Constructors

OldFormat |
NewFormat |