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

Safe HaskellNone

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

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))

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

Associated Types

type ApplyMonadOver state m :: * -> *

Methods

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

class ApplyMonadState state

Associated Types

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

Methods

toTree :: s m -> Tree m