Safe Haskell | None |
---|
- hSource :: MonadIO m => (Handle -> m a) -> Handle -> FeedSource m a
- hSource' :: (Handle -> IO a) -> IO Handle -> FeedSource IO a
- hSourceRes :: (MonadIO m, MonadResource m) => (Handle -> m a) -> IO Handle -> FeedSource m a
- hSourceNoEOF :: MonadIO m => (Handle -> m a) -> Handle -> FeedSource m a
- hSourceNoEOF' :: (Handle -> IO a) -> IO Handle -> FeedSource IO a
- hSourceResNoEOF :: (MonadIO m, MonadResource m) => (Handle -> m a) -> IO Handle -> FeedSource m a
- hSink :: MonadIO m => (Handle -> a -> m ()) -> Handle -> Sink a m ()
- hSinkRes :: (MonadIO m, MonadResource m) => (Handle -> a -> m ()) -> IO Handle -> Sink a m ()
Source
hSource :: MonadIO m => (Handle -> m a) -> Handle -> FeedSource m aSource
Source from a handle. The handle will not be closed and is read till hIsEOF.
hSource' :: (Handle -> IO a) -> IO Handle -> FeedSource IO aSource
Same as hSource, but opens the handle when transfer is called and closes it when
transfer/feedToSink completes.
Uses bracket
to ensure safe release of the allocated resources.
hSourceRes :: (MonadIO m, MonadResource m) => (Handle -> m a) -> IO Handle -> FeedSource m aSource
Same as hSource, but opens the handle when transfer is called and closes it when transfer/feedToSink completes.
hSourceNoEOF :: MonadIO m => (Handle -> m a) -> Handle -> FeedSource m aSource
Same as hSource, but does not check for hIsEOF and therefore never terminates.
hSourceNoEOF' :: (Handle -> IO a) -> IO Handle -> FeedSource IO aSource
Same as hSource', but does not check for hIsEOF and therefore never terminates.
hSourceResNoEOF :: (MonadIO m, MonadResource m) => (Handle -> m a) -> IO Handle -> FeedSource m aSource
Same as hSourceRes', but does not check for hIsEOF and therefore never terminates.
Sink
hSink :: MonadIO m => (Handle -> a -> m ()) -> Handle -> Sink a m ()Source
Sink backed by a handle. The data will be written by the provided function. The sink will never change to the SinkDone state (if the device is full then the operation will simply fail). The handle is not closed and exceptions are not catched.