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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Bracketed

Synopsis

- data Bracketed p wX wY where
  - Singleton :: p wX wY -> Bracketed p wX wY
  - Braced :: BracketedFL p wX wY -> Bracketed p wX wY
  - Parens :: BracketedFL p wX wY -> Bracketed p wX wY
- mapBracketed :: (forall wA wB. p wA wB -> q wA wB) -> Bracketed p wX wY -> Bracketed q wX wY
- unBracketed :: Bracketed p wX wY -> FL p wX wY
- type BracketedFL p wX wY = FL (Bracketed p) wX wY
- mapBracketedFLFL :: (forall wA wB. p wA wB -> q wA wB) -> BracketedFL p wX wY -> BracketedFL q wX wY
- unBracketedFL :: BracketedFL p wX wY -> FL p wX wY

# Documentation

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

Instances

PatchListFormat (Bracketed p) # |
Methods patchListFormat :: ListFormat (Bracketed p) #
ReadPatch p => ReadPatch (Bracketed p) # |
Methods readPatch' :: ParserM m => m (Sealed (Bracketed p wX)) #
type PrimOf (Bracketed p) # |
type PrimOf (Bracketed p) = PrimOf p

mapBracketed :: (forall wA wB. p wA wB -> q wA wB) -> Bracketed p wX wY -> Bracketed q wX wY #

unBracketed :: Bracketed p wX wY -> FL p wX wY #

type BracketedFL p wX wY = FL (Bracketed p) wX wY #

mapBracketedFLFL :: (forall wA wB. p wA wB -> q wA wB) -> BracketedFL p wX wY -> BracketedFL q wX wY #

unBracketedFL :: BracketedFL p wX wY -> FL p wX wY #