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

Safe HaskellNone
LanguageHaskell2010

Darcs.Patch.ApplyMonad

Synopsis

Documentation

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

Minimal complete definition

nestedApply, liftApply, getApplyState

Associated Types

type ApplyMonadBase m :: * -> * #

Methods

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

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

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

Instances
ApplyMonad Tree DefaultIO # 
Instance details

Defined in Darcs.Repository.ApplyPatches

Associated Types

type ApplyMonadBase DefaultIO :: * -> * #

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

Defined in Darcs.Patch.ApplyMonad

Associated Types

type ApplyMonadBase (TreeMonad m) :: * -> * #

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

Defined in Darcs.Patch.Prim.FileUUID.Apply

Associated Types

type ApplyMonadBase (StateT (ObjectMap m) m) :: * -> * #

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

Minimal complete definition

runApplyMonad

Associated Types

type ApplyMonadOver state m :: * -> * #

Methods

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

Instances
(Functor m, Monad m) => ApplyMonadTrans Tree m # 
Instance details

Defined in Darcs.Patch.ApplyMonad

Associated Types

type ApplyMonadOver Tree m :: * -> * #

Methods

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

Monad m => ApplyMonadTrans ObjectMap m # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Apply

Associated Types

type ApplyMonadOver ObjectMap m :: * -> * #

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

Associated Types

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

Instances
ApplyMonadState Tree # 
Instance details

Defined in Darcs.Patch.ApplyMonad

Associated Types

type ApplyMonadStateOperations Tree :: (* -> *) -> Constraint #

ApplyMonadState ObjectMap # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Apply

Associated Types

type ApplyMonadStateOperations ObjectMap :: (* -> *) -> Constraint #

withFileNames :: Maybe [OrigFileNameOf] -> [FileName] -> 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.

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

class ToTree s where #

Minimal complete definition

toTree

Methods

toTree :: s m -> Tree m #

Instances
ToTree Tree # 
Instance details

Defined in Darcs.Patch.ApplyMonad

Methods

toTree :: Tree m -> Tree m #

ToTree ObjectMap # 
Instance details

Defined in Darcs.Patch.Prim.FileUUID.Apply

Methods

toTree :: ObjectMap m -> Tree m #

class (Functor m, Monad m) => ApplyMonadTree m where #