Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class (Functor m, Monad m, Functor (ApplyMonadBase m), Monad (ApplyMonadBase m), ToTree state) => ApplyMonad m state where
- type ApplyMonadBase m :: * -> *
- 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 ()
- class (Functor m, Monad m, ApplyMonad (ApplyMonadOver m state) state) => ApplyMonadTrans m state where
- type ApplyMonadOver m state :: * -> *
- runApplyMonad :: ApplyMonadOver m state x -> state m -> m (x, state m)
- withFileNames :: Maybe [OrigFileNameOf] -> [FileName] -> FilePathMonad a -> FilePathMonadState
- withFiles :: [(FileName, ByteString)] -> RestrictedApply a -> [(FileName, ByteString)]
- class ToTree s where
Documentation
class (Functor m, Monad m, Functor (ApplyMonadBase m), Monad (ApplyMonadBase m), ToTree state) => ApplyMonad m state where Source
nestedApply, liftApply, getApplyState, putApplyState, editFile, editDirectory, mDoesDirectoryExist, mDoesFileExist, mReadFilePS, mCreateDirectory, mRemoveDirectory, mRemoveFile, mRename, mModifyFilePS
type ApplyMonadBase m :: * -> * Source
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
putApplyState :: state m -> m () Source
editFile :: (state ~ ObjectMap) => UUID -> (ByteString -> ByteString) -> m () Source
editDirectory :: (state ~ ObjectMap) => UUID -> (DirContent -> DirContent) -> m () Source
mDoesDirectoryExist :: (state ~ Tree) => FileName -> m Bool Source
mDoesFileExist :: (state ~ Tree) => FileName -> m Bool Source
mReadFilePS :: (state ~ Tree) => FileName -> m ByteString Source
mReadFilePSs :: (state ~ Tree) => FileName -> m [ByteString] Source
mCreateDirectory :: (state ~ Tree) => FileName -> m () Source
mRemoveDirectory :: (state ~ Tree) => FileName -> m () Source
mCreateFile :: (state ~ Tree) => FileName -> m () Source
mRemoveFile :: (state ~ Tree) => FileName -> m () Source
mRename :: (state ~ Tree) => FileName -> FileName -> m () Source
mModifyFilePS :: (state ~ Tree) => FileName -> (ByteString -> m ByteString) -> m () Source
mModifyFilePSs :: (state ~ Tree) => FileName -> ([ByteString] -> m [ByteString]) -> m () Source
mChangePref :: (state ~ Tree) => String -> String -> String -> m () Source
ApplyMonad FileModMonad Tree | |
ApplyMonad DefaultIO 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 Source
type ApplyMonadOver m state :: * -> * Source
runApplyMonad :: ApplyMonadOver m state x -> state m -> m (x, state m) Source
(Functor m, Monad m) => ApplyMonadTrans m Tree | |
(Functor m, Monad m) => ApplyMonadTrans m ObjectMap |
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