Safe Haskell | None |
---|---|
Language | Haskell2010 |
Darcs.Patch.ApplyMonad
Synopsis
- 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 #
Minimal complete definition
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)) #
Instances
class (Functor m, Monad m, ApplyMonad state (ApplyMonadOver state m)) => ApplyMonadTrans (state :: (* -> *) -> *) m where #
Minimal complete definition
Associated Types
type ApplyMonadOver state m :: * -> * #
Methods
runApplyMonad :: ApplyMonadOver state m x -> state m -> m (x, state m) #
Instances
(Functor m, Monad m) => ApplyMonadTrans Tree m # | |
Defined in Darcs.Patch.ApplyMonad Associated Types type ApplyMonadOver Tree m :: * -> * # Methods runApplyMonad :: ApplyMonadOver Tree m x -> Tree m -> m (x, Tree m) # | |
Monad m => ApplyMonadTrans ObjectMap m # | |
Defined in Darcs.Patch.Prim.FileUUID.Apply Associated Types type ApplyMonadOver ObjectMap m :: * -> * # Methods runApplyMonad :: ApplyMonadOver ObjectMap m x -> ObjectMap m -> m (x, ObjectMap m) # |
class ApplyMonadState (state :: (* -> *) -> *) #
Associated Types
type ApplyMonadStateOperations state :: (* -> *) -> Constraint #
Instances
ApplyMonadState Tree # | |
Defined in Darcs.Patch.ApplyMonad Associated Types type ApplyMonadStateOperations Tree :: (* -> *) -> Constraint # | |
ApplyMonadState ObjectMap # | |
Defined in Darcs.Patch.Prim.FileUUID.Apply Associated Types type ApplyMonadStateOperations ObjectMap :: (* -> *) -> 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)] #
Minimal complete definition
class (Functor m, Monad m) => ApplyMonadTree m where #
Minimal complete definition
mDoesDirectoryExist, mDoesFileExist, mReadFilePS, mCreateDirectory, mRemoveDirectory, mRemoveFile, mRename, mModifyFilePS
Methods
mDoesDirectoryExist :: FileName -> m Bool #
mDoesFileExist :: FileName -> m Bool #
mReadFilePS :: FileName -> m ByteString #
mCreateDirectory :: FileName -> m () #
mRemoveDirectory :: FileName -> m () #
mCreateFile :: FileName -> m () #
mRemoveFile :: FileName -> m () #
mRename :: FileName -> FileName -> m () #
mModifyFilePS :: FileName -> (ByteString -> m ByteString) -> m () #
mChangePref :: String -> String -> String -> m () #