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

Darcs.Patch.ApplyMonad

Synopsis

Documentation

class (Monad m, Monad (ApplyMonadBase m), ApplyMonadStateOperations state m, ToTree state) => ApplyMonad (state :: (* -> *) -> *) m where Source #

Associated Types

type ApplyMonadBase m :: * -> * Source #

Methods

nestedApply :: m x -> state (ApplyMonadBase m) -> m (x, state (ApplyMonadBase m)) Source #

liftApply :: (state (ApplyMonadBase m) -> ApplyMonadBase m x) -> state (ApplyMonadBase m) -> m (x, state (ApplyMonadBase m)) Source #

getApplyState :: m (state (ApplyMonadBase m)) Source #

Instances

Instances details
ApplyMonad Tree DefaultIO Source # 
Instance details

Defined in Darcs.Repository.ApplyPatches

Associated Types

type ApplyMonadBase DefaultIO :: Type -> Type Source #

Monad m => ApplyMonad Tree (TreeMonad m) Source # 
Instance details

Defined in Darcs.Patch.ApplyMonad

Associated Types

type ApplyMonadBase (TreeMonad m) :: Type -> Type Source #

Monad m => ApplyMonad ObjectMap (StateT (ObjectMap m) m) Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Apply

Associated Types

type ApplyMonadBase (StateT (ObjectMap m) m) :: Type -> Type Source #

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

Associated Types

type ApplyMonadOver state m :: * -> * Source #

Methods

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

Instances

Instances details
Monad m => ApplyMonadTrans Tree m Source # 
Instance details

Defined in Darcs.Patch.ApplyMonad

Associated Types

type ApplyMonadOver Tree m :: Type -> Type Source #

Methods

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

Monad m => ApplyMonadTrans ObjectMap m Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Apply

Associated Types

type ApplyMonadOver ObjectMap m :: Type -> Type Source #

class ApplyMonadState (state :: (* -> *) -> *) Source #

Associated Types

type ApplyMonadStateOperations state :: (* -> *) -> Constraint Source #

Instances

Instances details
ApplyMonadState Tree Source # 
Instance details

Defined in Darcs.Patch.ApplyMonad

Associated Types

type ApplyMonadStateOperations Tree :: (Type -> Type) -> Constraint Source #

ApplyMonadState ObjectMap Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Apply

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

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.

withFiles :: [(AnchoredPath, ByteString)] -> RestrictedApply a -> [(AnchoredPath, ByteString)] Source #

class ToTree s where Source #

Methods

toTree :: s m -> Tree m Source #

Instances

Instances details
ToTree Tree Source # 
Instance details

Defined in Darcs.Patch.ApplyMonad

Methods

toTree :: forall (m :: Type -> Type). Tree m -> Tree m Source #

ToTree ObjectMap Source # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Apply

Methods

toTree :: forall (m :: Type -> Type). ObjectMap m -> Tree m Source #

class Monad m => ApplyMonadTree m where Source #