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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Format

Synopsis

- class PatchListFormat (p :: Type -> Type -> Type) where
  - patchListFormat :: ListFormat p
- data ListFormat (p :: Type -> Type -> Type)
  - = ListFormatDefault
  - | ListFormatV1
  - | ListFormatV2
  - | ListFormatV3
- data FileNameFormat
  - = FileNameFormatV1
  - | FileNameFormatV2
  - | FileNameFormatDisplay

# Documentation

class PatchListFormat (p :: Type -> Type -> Type) 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.

Minimal complete definition

Nothing

Methods

patchListFormat :: ListFormat p #

#### Instances

Instances details

PatchListFormat Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Show Methods patchListFormat :: ListFormat Prim #
PatchListFormat Prim # |
Instance details Defined in Darcs.Patch.V1.Prim Methods patchListFormat :: ListFormat Prim #
PatchListFormat Prim # |
Instance details Defined in Darcs.Patch.V2.Prim Methods patchListFormat :: ListFormat Prim #
PatchListFormat (Bracketed p) # |
Instance details Defined in Darcs.Patch.Bracketed Methods patchListFormat :: ListFormat (Bracketed p) #
PatchListFormat p => PatchListFormat (Invertible p) # |
Instance details Defined in Darcs.Patch.Invertible Methods patchListFormat :: ListFormat (Invertible p) #
PatchListFormat (Named p) # |
Instance details Defined in Darcs.Patch.Named Methods patchListFormat :: ListFormat (Named p) #
PatchListFormat (PatchInfoAndG p) # |
Instance details Defined in Darcs.Patch.PatchInfoAnd Methods patchListFormat :: ListFormat (PatchInfoAndG p) #
PatchListFormat (RebaseChange prim) # |
Instance details Defined in Darcs.Patch.Rebase.Change Methods patchListFormat :: ListFormat (RebaseChange prim) #
PatchListFormat (RebaseFixup prim) # |
Instance details Defined in Darcs.Patch.Rebase.Fixup Methods patchListFormat :: ListFormat (RebaseFixup prim) #
PatchListFormat (RepoPatchV1 prim) # |
Instance details Defined in Darcs.Patch.V1.Core Methods patchListFormat :: ListFormat (RepoPatchV1 prim) #
PatchListFormat (RepoPatchV2 prim) # |
Instance details Defined in Darcs.Patch.V2.RepoPatch Methods patchListFormat :: ListFormat (RepoPatchV2 prim) #
PatchListFormat (PrimWithName name p) # |
Instance details Defined in Darcs.Patch.Prim.WithName Methods patchListFormat :: ListFormat (PrimWithName name p) #
PatchListFormat (RepoPatchV3 name prim) # |
Instance details Defined in Darcs.Patch.V3.Core Methods patchListFormat :: ListFormat (RepoPatchV3 name prim) #

data ListFormat (p :: Type -> Type -> Type) #

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.
ListFormatV3 | Temporary hack to disable use of showContextSeries for darcs-3 patches, until I find out how to fix this.

data FileNameFormat #

Constructors

FileNameFormatV1 | on-disk format for V1 patches
FileNameFormatV2 | on-disk format for V2 patches
FileNameFormatDisplay | display format

#### Instances

Instances details

Show FileNameFormat # |
Instance details Defined in Darcs.Patch.Format Methods showsPrec :: Int -> FileNameFormat -> ShowS # show :: FileNameFormat -> String # showList :: [FileNameFormat] -> ShowS #
Eq FileNameFormat # |
Instance details Defined in Darcs.Patch.Format Methods (==) :: FileNameFormat -> FileNameFormat -> Bool # (/=) :: FileNameFormat -> FileNameFormat -> Bool #