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

Safe Haskell | None
Language | Haskell98

Data.IOData

Synopsis

- class IOData a where

# Documentation

class IOData a where #

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

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

Minimal complete definition

readFile, writeFile, getLine, hGetContents, hGetLine, hPut, hPutStrLn, hGetChunk

Methods

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

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

getLine :: MonadIO m => m a #

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

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

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

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

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

Instances

IOData ByteString # |
Methods readFile :: MonadIO m => FilePath -> m ByteString # writeFile :: MonadIO m => FilePath -> ByteString -> m () # getLine :: MonadIO m => m ByteString # hGetContents :: MonadIO m => Handle -> m ByteString # hGetLine :: MonadIO m => Handle -> m ByteString # hPut :: MonadIO m => Handle -> ByteString -> m () # hPutStrLn :: MonadIO m => Handle -> ByteString -> m () # hGetChunk :: MonadIO m => Handle -> m ByteString #
IOData ByteString # |
Methods readFile :: MonadIO m => FilePath -> m ByteString # writeFile :: MonadIO m => FilePath -> ByteString -> m () # getLine :: MonadIO m => m ByteString # hGetContents :: MonadIO m => Handle -> m ByteString # hGetLine :: MonadIO m => Handle -> m ByteString # hPut :: MonadIO m => Handle -> ByteString -> m () # hPutStrLn :: MonadIO m => Handle -> ByteString -> m () # hGetChunk :: MonadIO m => Handle -> m ByteString #
IOData Text # |
Methods readFile :: MonadIO m => FilePath -> m Text # writeFile :: MonadIO m => FilePath -> Text -> m () # getLine :: MonadIO m => m Text # hGetContents :: MonadIO m => Handle -> m Text # hGetLine :: MonadIO m => Handle -> m Text # hPut :: MonadIO m => Handle -> Text -> m () # hPutStrLn :: MonadIO m => Handle -> Text -> m () # hGetChunk :: MonadIO m => Handle -> m Text #
IOData Text # |
Methods readFile :: MonadIO m => FilePath -> m Text # writeFile :: MonadIO m => FilePath -> Text -> m () # getLine :: MonadIO m => m Text # hGetContents :: MonadIO m => Handle -> m Text # hGetLine :: MonadIO m => Handle -> m Text # hPut :: MonadIO m => Handle -> Text -> m () # hPutStrLn :: MonadIO m => Handle -> Text -> m () # hGetChunk :: MonadIO m => Handle -> m Text #
(~) * Char c => IOData [c] # |
Methods readFile :: MonadIO m => FilePath -> m [c] # writeFile :: MonadIO m => FilePath -> [c] -> m () # getLine :: MonadIO m => m [c] # hGetContents :: MonadIO m => Handle -> m [c] # hGetLine :: MonadIO m => Handle -> m [c] # hPut :: MonadIO m => Handle -> [c] -> m () # hPutStrLn :: MonadIO m => Handle -> [c] -> m () # hGetChunk :: MonadIO m => Handle -> m [c] #