darcs

Darcs.IO

# Documentation

class (Functor m, MonadPlus m) => ReadableDirectory m where

Methods

mDoesDirectoryExist :: FileName -> m Bool

mDoesFileExist :: FileName -> m Bool

mInCurrentDirectory :: FileName -> m a -> m a

mGetDirectoryContents :: m [FileName]

mReadBinFile :: FileName -> m String

mReadFilePS :: FileName -> m ByteString

mReadFilePSs :: FileName -> m [ByteString]

Instances

ReadableDirectory IO |
ReadableDirectory SilentIO |
ReadableDirectory TolerantIO |
ReadableDirectory FilePathMonad |
(Functor m, MonadPlus m, MonadError e m) => ReadableDirectory (TreeMonad m) |
ReadableDirectory (HashedIO r p) |

class ReadableDirectory m => WriteableDirectory m where

Methods

mWithCurrentDirectory :: FileName -> m a -> m a

mSetFileExecutable :: FileName -> Bool -> m ()

mWriteBinFile :: FileName -> String -> m ()

mWriteFilePS :: FileName -> ByteString -> m ()

mWriteFilePSs :: FileName -> [ByteString] -> m ()

mCreateDirectory :: FileName -> m ()

mRemoveDirectory :: FileName -> m ()

mWriteDoc :: FileName -> Doc -> m ()

mCreateFile :: FileName -> m ()

mRemoveFile :: FileName -> m ()

mRename :: FileName -> FileName -> m ()

mModifyFilePS :: FileName -> (ByteString -> m ByteString) -> m ()

mModifyFilePSs :: FileName -> ([ByteString] -> m [ByteString]) -> m ()

Instances

WriteableDirectory IO |
WriteableDirectory SilentIO |
WriteableDirectory TolerantIO |
WriteableDirectory FilePathMonad |
(Functor m, MonadPlus m, MonadError e m) => WriteableDirectory (TreeMonad m) |
WriteableDirectory (HashedIO RW p) |

data TolerantIO a

Instances

Monad TolerantIO |
Functor TolerantIO |
MonadPlus TolerantIO |
TolerantMonad TolerantIO |
WriteableDirectory TolerantIO |
ReadableDirectory TolerantIO |

runTolerantly :: TolerantIO a -> IO a

runSilently :: SilentIO a -> IO a