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

Darcs.Patch.ApplyMonad

Synopsis

Documentation

class (Monad m, ApplyMonadOperations state m) => ApplyMonad (state :: (Type -> Type) -> Type) (m :: Type -> Type) | m -> state where #

Methods

readFilePS :: ObjectIdOf state -> m ByteString #

class (Monad m, ApplyMonad state (ApplyMonadOver state m)) => ApplyMonadTrans (state :: (Type -> Type) -> Type) (m :: Type -> Type) where #

Associated Types

type ApplyMonadOver (state :: (Type -> Type) -> Type) (m :: Type -> Type) :: Type -> Type #

Methods

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

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

MonadThrow m => ApplyMonadTrans Tree m # 
Instance details

Defined in Darcs.Patch.ApplyMonad

Associated Types

type ApplyMonadOver Tree m 
Instance details

Defined in Darcs.Patch.ApplyMonad

Methods

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

type family ApplyMonadOperations (state :: (Type -> Type) -> Type) :: (Type -> Type) -> Constraint #

Instances

Instances details
type ApplyMonadOperations ObjectMap # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Apply

type ApplyMonadOperations Tree # 
Instance details

Defined in Darcs.Patch.ApplyMonad

withFileNames :: Maybe [OrigFileNameOf] -> [AnchoredPath] -> FilePathMonad a -> FilePathMonadState #

withFileNames takes a maybe list of existing rename-pairs, a list of filenames and an action, and returns the resulting triple of affected files, updated filename list and new rename details. If the rename-pairs are not present, a new list is generated from the filesnames.

class MonadThrow m => ApplyMonadTree (m :: Type -> Type) where #

evalApplyMonad :: ApplyMonadTrans state m => ApplyMonadOver state m a -> state m -> m a #