darcs

Safe Haskell | Safe-Infered

Darcs.Patch.Bracketed

Synopsis

- data Bracketed p where
  - Singleton :: p -> Bracketed p
  - Braced :: BracketedFL p -> Bracketed p
  - Parens :: BracketedFL p -> Bracketed p
- mapBracketed :: (p -> q) -> Bracketed p -> Bracketed q
- unBracketed :: Bracketed p -> FL p
- type BracketedFL p = FL (Bracketed p)
- mapBracketedFL_FL :: (p -> q) -> BracketedFL p -> BracketedFL q
- unBracketedFL :: BracketedFL p -> FL p

# Documentation

data Bracketed p 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 -> Bracketed p |
Braced :: BracketedFL p -> Bracketed p |
Parens :: BracketedFL p -> Bracketed p |

Instances

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

mapBracketed :: (p -> q) -> Bracketed p -> Bracketed q

unBracketed :: Bracketed p -> FL p

type BracketedFL p = FL (Bracketed p)

mapBracketedFL_FL :: (p -> q) -> BracketedFL p -> BracketedFL q

unBracketedFL :: BracketedFL p -> FL p