Data.IOData

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

Safe Haskell | None
Language | Haskell98

Data.IOData

Synopsis

- class IsSequence a => IOData a where
  - 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

# Documentation

class IsSequence a => 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.

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 |
IOData ByteString |
IOData Text |
IOData Text |
(~) * Char c => IOData [c] |