Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class (Functor m, Monad m, Functor (ApplyMonadBase m), Monad (ApplyMonadBase m), ApplyMonadStateOperations state m, ToTree state) => ApplyMonad (state :: (* -> *) -> *) m where
- type ApplyMonadBase m :: * -> *
- class (Functor m, Monad m, ApplyMonad state (ApplyMonadOver state m)) => ApplyMonadTrans (state :: (* -> *) -> *) m where
- type ApplyMonadOver state m :: * -> *
- class ApplyMonadState (state :: (* -> *) -> *) where
- type ApplyMonadStateOperations state :: (* -> *) -> Constraint
- withFileNames :: Maybe [OrigFileNameOf] -> [FileName] -> FilePathMonad a -> FilePathMonadState
- withFiles :: [(FileName, ByteString)] -> RestrictedApply a -> [(FileName, ByteString)]
- class ToTree s where
- class (Functor m, Monad m) => ApplyMonadTree m where
Documentation
class (Functor m, Monad m, Functor (ApplyMonadBase m), Monad (ApplyMonadBase m), ApplyMonadStateOperations state m, ToTree state) => ApplyMonad (state :: (* -> *) -> *) m where Source #
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 #
class (Functor m, Monad m, ApplyMonad state (ApplyMonadOver state m)) => ApplyMonadTrans (state :: (* -> *) -> *) m where Source #
type ApplyMonadOver state m :: * -> * Source #
runApplyMonad :: ApplyMonadOver state m x -> state m -> m (x, state m) Source #
class ApplyMonadState (state :: (* -> *) -> *) Source #
type ApplyMonadStateOperations state :: (* -> *) -> 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 (Functor m, Monad m) => ApplyMonadTree m where Source #
mDoesDirectoryExist, mDoesFileExist, mReadFilePS, mCreateDirectory, mRemoveDirectory, mRemoveFile, mRename, mModifyFilePS
mDoesDirectoryExist :: FileName -> m Bool Source #
mDoesFileExist :: FileName -> m Bool Source #
mReadFilePS :: FileName -> m ByteString Source #
mCreateDirectory :: FileName -> m () Source #
mRemoveDirectory :: FileName -> m () Source #
mCreateFile :: FileName -> m () Source #
mRemoveFile :: FileName -> m () Source #
mRename :: FileName -> FileName -> m () Source #
mModifyFilePS :: FileName -> (ByteString -> m ByteString) -> m () Source #
ApplyMonadTree DefaultIO Source # | |
(Functor m, Monad m) => ApplyMonadTree (TreeMonad m) Source # | |