Darcs.Patch.ApplyMonad
Documentation
class (Functor m, Monad m, Functor (ApplyMonadBase m), Monad (ApplyMonadBase m), ToTree state) => ApplyMonad m state 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))
putApplyState :: state m -> m ()
editFile :: state ~ ObjectMap => UUID -> (ByteString -> ByteString) -> m ()
editDirectory :: state ~ ObjectMap => UUID -> (DirContent -> DirContent) -> m ()
mDoesDirectoryExist :: state ~ Tree => FileName -> m Bool
mDoesFileExist :: state ~ Tree => FileName -> m Bool
mReadFilePS :: state ~ Tree => FileName -> m ByteString
mReadFilePSs :: state ~ Tree => FileName -> m [ByteString]
mCreateDirectory :: state ~ Tree => FileName -> m ()
mRemoveDirectory :: state ~ Tree => FileName -> m ()
mCreateFile :: state ~ Tree => FileName -> m ()
mRemoveFile :: state ~ Tree => FileName -> m ()
mRename :: state ~ Tree => FileName -> FileName -> m ()
mModifyFilePS :: state ~ Tree => FileName -> (ByteString -> m ByteString) -> m ()
mModifyFilePSs :: state ~ Tree => FileName -> ([ByteString] -> m [ByteString]) -> m ()
mChangePref :: state ~ Tree => String -> String -> String -> m ()
Instances
| ApplyMonad IO Tree | |
| ApplyMonad RestrictedApply Tree | |
| ApplyMonad FilePathMonad Tree | |
| ApplyMonad AnnotatedM Tree | |
| ApplyMonad SilentIO Tree | |
| ApplyMonad TolerantIO Tree | |
| (Functor m, Monad m) => ApplyMonad (TreeMonad m) Tree | |
| ApplyMonad (HashedIO p) Tree | |
| (Functor m, Monad m) => ApplyMonad (StateT (ObjectMap m) m) ObjectMap |
class (Functor m, Monad m, ApplyMonad (ApplyMonadOver m state) state) => ApplyMonadTrans m state where
Associated Types
type ApplyMonadOver m state :: * -> *
Methods
runApplyMonad :: ApplyMonadOver m state x -> state m -> m (x, state m)
Instances
| (Functor m, Monad m) => ApplyMonadTrans m Tree | |
| (Functor m, Monad m) => ApplyMonadTrans m ObjectMap |
withFilePaths :: [FileName] -> FilePathMonad a -> [FileName]
withFiles :: [(FileName, ByteString)] -> RestrictedApply a -> [(FileName, ByteString)]