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

Safe Haskell | None

Darcs.Patch.Bracketed

Synopsis

- data Bracketed p x y where
  - Singleton :: p x y -> Bracketed p x y
  - Braced :: BracketedFL p x y -> Bracketed p x y
  - Parens :: BracketedFL p x y -> Bracketed p x y
- mapBracketed :: (forall a b. p a b -> q a b) -> Bracketed p x y -> Bracketed q x y
- unBracketed :: Bracketed p x y -> FL p x y
- type BracketedFL p x y = FL (Bracketed p) x y
- mapBracketedFL_FL :: (forall a b. p a b -> q a b) -> BracketedFL p x y -> BracketedFL q x y
- unBracketedFL :: BracketedFL p x y -> FL p x y

# Documentation

data Bracketed p x y where

This type exists for legacy support of on-disk format patch formats. It is a wrapper type that explicitly tracks the nesting of braces and parens in the on-disk representation of such patches. It is used as an intermediate form when reading such patches normally, and also for round-tripping such patches when checking the hash in bundles. It shouldn't be used for anything else.

Constructors

Singleton :: p x y -> Bracketed p x y |
Braced :: BracketedFL p x y -> Bracketed p x y |
Parens :: BracketedFL p x y -> Bracketed p x y |

Instances

PatchListFormat (Bracketed p) |
ReadPatch p => ReadPatch (Bracketed p) |
ShowPatchBasic p => ShowPatchBasic (Bracketed p) |

mapBracketed :: (forall a b. p a b -> q a b) -> Bracketed p x y -> Bracketed q x y

unBracketed :: Bracketed p x y -> FL p x y

type BracketedFL p x y = FL (Bracketed p) x y

mapBracketedFL_FL :: (forall a b. p a b -> q a b) -> BracketedFL p x y -> BracketedFL q x y

unBracketedFL :: BracketedFL p x y -> FL p x y