chunked-data-0.3.0: Typeclasses for dealing with various chunked data representations

Safe HaskellNone
LanguageHaskell98

Data.IOData

Synopsis

Documentation

class IOData a where Source #

Data which can be read to and from files and handles.

Note that, for lazy sequences, these operations may perform lazy I/O.

Methods

readFile :: MonadIO m => FilePath -> m a Source #

writeFile :: MonadIO m => FilePath -> a -> m () Source #

getLine :: MonadIO m => m a Source #

hGetContents :: MonadIO m => Handle -> m a Source #

hGetLine :: MonadIO m => Handle -> m a Source #

hPut :: MonadIO m => Handle -> a -> m () Source #

hPutStrLn :: MonadIO m => Handle -> a -> m () Source #

hGetChunk :: MonadIO m => Handle -> m a Source #

Instances

IOData ByteString Source # 
IOData ByteString Source # 
IOData Text Source # 
IOData Text Source # 
(~) * Char c => IOData [c] Source # 

Methods

readFile :: MonadIO m => FilePath -> m [c] Source #

writeFile :: MonadIO m => FilePath -> [c] -> m () Source #

getLine :: MonadIO m => m [c] Source #

hGetContents :: MonadIO m => Handle -> m [c] Source #

hGetLine :: MonadIO m => Handle -> m [c] Source #

hPut :: MonadIO m => Handle -> [c] -> m () Source #

hPutStrLn :: MonadIO m => Handle -> [c] -> m () Source #

hGetChunk :: MonadIO m => Handle -> m [c] Source #