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

Safe Haskell | None
Language | Haskell2010

Darcs.Patch.Prim.FileUUID.ObjectMap

Synopsis

- newtype UUID = UUID ByteString
- data Location = L !UUID !Name
- data Object (m :: Type -> Type)
  - = Directory DirContent
  - | Blob (m FileContent) !(Maybe Hash)
- data ObjectMap (m :: Type -> Type) = ObjectMap {
  - getObject :: UUID -> m (Maybe (Object m))
  - putObject :: UUID -> Object m -> m (ObjectMap m)
  - listObjects :: m [UUID]
  }
- type DirContent = Map Name UUID
- type FileContent = ByteString
- isBlob :: forall (m :: Type -> Type). Object m -> Bool
- isDirectory :: forall (m :: Type -> Type). Object m -> Bool
- data Name

# Documentation

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 Object (m :: Type -> Type) #

Constructors

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

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

Constructors

ObjectMap |

Fields

- getObject :: UUID -> m (Maybe (Object m))
- putObject :: UUID -> Object m -> m (ObjectMap m)
- listObjects :: m [UUID]

#### Instances

Instances details

MonadThrow m => ApplyMonadTrans ObjectMap m # |

Instance details

Defined in Darcs.Patch.Prim.FileUUID.Apply

Associated Types

type ApplyMonadOver ObjectMap m |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Apply type ApplyMonadOver ObjectMap m = StateT (ObjectMap m) m

Methods

runApplyMonad :: ApplyMonadOver ObjectMap m x -> ObjectMap m -> m (x, ObjectMap m) #

MonadThrow m => ApplyMonad ObjectMap (StateT (ObjectMap m) m) # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Apply Methods readFilePS :: ObjectIdOf ObjectMap -> StateT (ObjectMap m) m ByteString #
type ApplyMonadOperations ObjectMap # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Apply type ApplyMonadOperations ObjectMap
type ObjectIdOf ObjectMap # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.ObjectMap type ObjectIdOf ObjectMap = UUID
type ApplyMonadOver ObjectMap m # |
Instance details Defined in Darcs.Patch.Prim.FileUUID.Apply type ApplyMonadOver ObjectMap m = StateT (ObjectMap m) m

type DirContent = Map Name UUID #

type FileContent = ByteString #

isBlob :: forall (m :: Type -> Type). Object m -> Bool #

isDirectory :: forall (m :: Type -> Type). Object m -> 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 #