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 Source #

Minimal complete definition

nestedApply, liftApply, getApplyState

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

ApplyMonad Tree FileModMonad Source # 
ApplyMonad Tree DefaultIO Source # 
(Functor m, Monad m) => ApplyMonad Tree (TreeMonad m) Source # 
ApplyMonad Tree (HashedIO p) Source # 

class (Functor m, Monad m, ApplyMonad state (ApplyMonadOver state m)) => ApplyMonadTrans state m where Source #

Minimal complete definition

runApplyMonad

Associated Types

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

Methods

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

Instances

(Functor m, Monad m) => ApplyMonadTrans Tree m Source # 

Associated Types

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

Methods

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

class ApplyMonadState state Source #

Associated Types

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

Instances

ApplyMonadState Tree Source # 

Associated Types

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

withFileNames :: Maybe [OrigFileNameOf] -> [FileName] -> 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 :: [(FileName, ByteString)] -> RestrictedApply a -> [(FileName, ByteString)] Source #

class ToTree s where Source #

Minimal complete definition

toTree

Methods

toTree :: s m -> Tree m Source #

Instances

ToTree Tree Source # 

Methods

toTree :: Tree m -> Tree m Source #

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

Instances

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