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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Prim.FileUUID.Core

Synopsis

- data Prim wX wY where
  - Hunk :: forall wX wY. !UUID -> !(Hunk wX wY) -> Prim wX wY
  - HunkMove :: forall wX wY. !(HunkMove wX wY) -> Prim wX wY
  - Manifest :: forall wX wY. !UUID -> !Location -> Prim wX wY
  - Demanifest :: forall wX wY. !UUID -> !Location -> Prim wX wY
  - Identity :: forall wX. Prim wX wX
- data Hunk wX wY = H !Int !FileContent !FileContent
- data HunkMove wX wY = HM !UUID !Int !UUID !Int !FileContent
- data Object (m :: Type -> Type)
  - = Directory DirContent
  - | Blob (m FileContent) !(Maybe Hash)
- newtype UUID = UUID ByteString
- data Location = L !UUID !Name
- data Name
- type FileContent = ByteString

# Documentation

data Prim wX wY where #

Constructors

Hunk :: forall wX wY. !UUID -> !(Hunk wX wY) -> Prim wX wY |
HunkMove :: forall wX wY. !(HunkMove wX wY) -> Prim wX wY |
Manifest :: forall wX wY. !UUID -> !Location -> Prim wX wY |
Demanifest :: forall wX wY. !UUID -> !Location -> Prim wX wY |
Identity :: forall wX. Prim wX wX |

#### Instances

Instances details

Annotate Prim # |
Instance details Defined in Darcs.Patch.Annotate Methods annotate :: Prim wX wY -> AnnotatedM () #
Apply Prim # |

Instance details

Defined in Darcs.Patch.Prim.FileUUID.Apply

Associated Types

type ApplyState Prim |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Apply type ApplyState Prim = ObjectMap

Methods

apply :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m () #

unapply :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m () #

Commute Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Commute Methods commute :: (Prim :> Prim) wX wY -> Maybe ((Prim :> Prim) wX wY) #
IsHunk Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods isHunk :: Prim wX wY -> Maybe (FileHunk (ObjectIdOfPatch Prim) wX wY) #
PatchListFormat Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Show Methods patchListFormat :: ListFormat Prim #
PatchInspect Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods listTouchedFiles :: Prim wX wY -> [AnchoredPath] # hunkMatches :: (ByteString -> Bool) -> Prim wX wY -> Bool #
Invert Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods invert :: Prim wX wY -> Prim wY wX #
CleanMerge Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Commute Methods cleanMerge :: (Prim :\/: Prim) wX wY -> Maybe ((Prim :/\: Prim) wX wY) #
PrimApply Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Apply Methods applyPrimFL :: ApplyMonad (ApplyState Prim) m => FL Prim wX wY -> m () #
PrimCoalesce Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Coalesce Methods tryToShrink :: FL Prim wX wY -> Maybe (FL Prim wX wY) # sortCoalesceFL :: FL Prim wX wY -> FL Prim wX wY # primCoalesce :: Prim wX wY -> Prim wY wZ -> Maybe (Prim wX wZ) # isIdentity :: Prim wX wY -> EqCheck wX wY # comparePrim :: Prim wA wB -> Prim wC wD -> Ordering #
PrimConstruct Prim # |

Instance details

Defined in Darcs.Patch.Prim.FileUUID.Core

Methods

addfile :: AnchoredPath -> Prim wX wY #

rmfile :: AnchoredPath -> Prim wX wY #

adddir :: AnchoredPath -> Prim wX wY #

rmdir :: AnchoredPath -> Prim wX wY #

move :: AnchoredPath -> AnchoredPath -> Prim wX wY #

changepref :: String -> String -> String -> Prim wX wY #

hunk :: AnchoredPath -> Int -> [ByteString] -> [ByteString] -> Prim wX wY #

tokreplace :: AnchoredPath -> String -> String -> String -> Prim wX wY #

binary :: AnchoredPath -> ByteString -> ByteString -> Prim wX wY #

primFromHunk :: FileHunk (ObjectIdOfPatch Prim) wX wY -> Prim wX wY #

PrimDetails Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Details Methods summarizePrim :: Prim wX wY -> [SummDetail] #
PrimMangleUnravelled Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID Methods mangleUnravelled :: Unravelled Prim wX -> Maybe (Mangled Prim wX) #
PrimRead Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Read Methods readPrim :: FileNameFormat -> Parser (Sealed (Prim wX)) #
PrimShow Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Show Methods showPrim :: FileNameFormat -> Prim wA wB -> Doc # showPrimWithContextAndApply :: ApplyMonad (ApplyState Prim) m => FileNameFormat -> Prim wA wB -> m Doc #
PrimSift Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Coalesce Methods primIsSiftable :: Prim wX wY -> Bool #
ReadPatch Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Read Methods readPatch' :: Parser (Sealed (Prim wX)) #
RepairToFL Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Apply Methods applyAndTryToFixFL :: ApplyMonad (ApplyState Prim) m => Prim wX wY -> m (Maybe (String, FL Prim wX wY)) #
Apply Prim => ShowContextPatch Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Show Methods showPatchWithContextAndApply :: ApplyMonad (ApplyState Prim) m => ShowPatchFor -> Prim wX wY -> m Doc #
ShowPatch Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Show Methods content :: Prim wX wY -> Doc # description :: Prim wX wY -> Doc # summary :: Prim wX wY -> Doc # summaryFL :: FL Prim wX wY -> Doc # thing :: Prim wX wY -> String # things :: Prim wX wY -> String #
ShowPatchBasic Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Show Methods showPatch :: ShowPatchFor -> Prim wX wY -> Doc #
Eq2 Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods unsafeCompare :: Prim wA wB -> Prim wC wD -> Bool # (=\/=) :: Prim wA wB -> Prim wA wC -> EqCheck wB wC # (=/\=) :: Prim wA wC -> Prim wB wC -> EqCheck wA wB #
Show2 Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods showDict2 :: ShowDict (Prim wX wY) #
Show1 (Prim wX) # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods showDict1 :: Dict (Show (Prim wX wX0)) #
Show (Prim wX wY) # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods showsPrec :: Int -> Prim wX wY -> ShowS # show :: Prim wX wY -> String # showList :: [Prim wX wY] -> ShowS #
Eq (Prim wX wY) # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods (==) :: Prim wX wY -> Prim wX wY -> Bool # (/=) :: Prim wX wY -> Prim wX wY -> Bool #
type ApplyState Prim # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Apply type ApplyState Prim = ObjectMap

data Hunk wX wY #

Constructors

H !Int !FileContent !FileContent |

#### Instances

Instances details

Eq2 Hunk # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods unsafeCompare :: Hunk wA wB -> Hunk wC wD -> Bool # (=\/=) :: Hunk wA wB -> Hunk wA wC -> EqCheck wB wC # (=/\=) :: Hunk wA wC -> Hunk wB wC -> EqCheck wA wB #
Show2 Hunk # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods showDict2 :: ShowDict (Hunk wX wY) #
Show1 (Hunk wX) # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods showDict1 :: Dict (Show (Hunk wX wX0)) #
Show (Hunk wX wY) # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods showsPrec :: Int -> Hunk wX wY -> ShowS # show :: Hunk wX wY -> String # showList :: [Hunk wX wY] -> ShowS #
Eq (Hunk wX wY) # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods (==) :: Hunk wX wY -> Hunk wX wY -> Bool # (/=) :: Hunk wX wY -> Hunk wX wY -> Bool #

data HunkMove wX wY #

Constructors

HM !UUID !Int !UUID !Int !FileContent |

#### Instances

Instances details

Eq2 HunkMove # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods unsafeCompare :: HunkMove wA wB -> HunkMove wC wD -> Bool # (=\/=) :: HunkMove wA wB -> HunkMove wA wC -> EqCheck wB wC # (=/\=) :: HunkMove wA wC -> HunkMove wB wC -> EqCheck wA wB #
Show (HunkMove wX wY) # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods showsPrec :: Int -> HunkMove wX wY -> ShowS # show :: HunkMove wX wY -> String # showList :: [HunkMove wX wY] -> ShowS #
Eq (HunkMove wX wY) # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Core Methods (==) :: HunkMove wX wY -> HunkMove wX wY -> Bool # (/=) :: HunkMove wX wY -> HunkMove wX wY -> Bool #

data Object (m :: Type -> Type) #

Constructors

Directory DirContent |
Blob (m FileContent) !(Maybe Hash) |

newtype UUID #

Constructors

UUID ByteString |

#### Instances

Instances details

Show UUID # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.ObjectMap Methods showsPrec :: Int -> UUID -> ShowS # show :: UUID -> String # showList :: [UUID] -> ShowS #
Eq UUID # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.ObjectMap Methods (==) :: UUID -> UUID -> Bool # (/=) :: UUID -> UUID -> Bool #
Ord UUID # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.ObjectMap Methods compare :: UUID -> UUID -> Ordering # (<) :: UUID -> UUID -> Bool # (<=) :: UUID -> UUID -> Bool # (>) :: UUID -> UUID -> Bool # (>=) :: UUID -> UUID -> Bool # max :: UUID -> UUID -> UUID # min :: UUID -> UUID -> UUID #

data Location #

An object is located by giving the `UUID` of the parent `Directory` and a `Name`.

Constructors

L !UUID !Name |

#### Instances

Instances details

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

data Name #

#### Instances

Instances details

Show Name # |
Instance details Defined in Darcs.Util.Path Methods showsPrec :: Int -> Name -> ShowS # show :: Name -> String # showList :: [Name] -> ShowS #
Binary Name # |
Instance details Defined in Darcs.Util.Path Methods put :: Name -> Put # get :: Get Name # putList :: [Name] -> Put #
Eq Name # |
Instance details Defined in Darcs.Util.Path Methods (==) :: Name -> Name -> Bool # (/=) :: Name -> Name -> Bool #
Ord Name # |
Instance details Defined in Darcs.Util.Path Methods compare :: Name -> Name -> Ordering # (<) :: Name -> Name -> Bool # (<=) :: Name -> Name -> Bool # (>) :: Name -> Name -> Bool # (>=) :: Name -> Name -> Bool # max :: Name -> Name -> Name # min :: Name -> Name -> Name #

type FileContent = ByteString #