darcs-2.12.5: 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 FileModMonad # 
ApplyMonad Tree DefaultIO # 
(Functor m, Monad m) => ApplyMonad Tree (TreeMonad m) # 
ApplyMonad Tree (HashedIO p) # 

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 # 

Associated Types

type ApplyMonadOver (Tree :: (* -> *) -> *) (m :: * -> *) :: * -> * #

Methods

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

class ApplyMonadState state #

Associated Types

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

Instances

ApplyMonadState Tree # 

Associated Types

type ApplyMonadStateOperations (Tree :: (* -> *) -> *) :: (* -> *) -> 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 # 

Methods

toTree :: Tree m -> Tree m #

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

Instances

ApplyMonadTree FileModMonad # 
ApplyMonadTree DefaultIO # 
(Functor m, Monad m) => ApplyMonadTree (TreeMonad m) # 
ApplyMonadTree (HashedIO p) #