Data.IterIO.Extra
Description
This module contains miscellaneous functions plus a few pieces of functionality that are missing from the standard Haskell libraries.
- iterLoop :: (MonadIO m, ChunkData t, Show t) => m (Iter t m (), Onum t m a)
- inumSplit :: (MonadIO m, ChunkData t) => Inum t t m a
- class Show t => SendRecvString t where
- hShutdown :: Handle -> CInt -> IO Int
- traceInput :: (ChunkData t, Monad m) => String -> Iter t m ()
- traceI :: (ChunkData t, Monad m) => String -> Iter t m ()
Miscellaneous
Functionality missing from system libraries
class Show t => SendRecvString t whereSource
SendRecvString
is the class of string-like objects that can be
used with datagram sockets.
hShutdown :: Handle -> CInt -> IO IntSource
Flushes a file handle and calls the shutdown system call so as
to write an EOF to a socket while still being able to read from it.
This is very important when the same file handle is being used to
to read data in an Onum
and to write data in an Iter
. Proper
protocol functioning may require the Iter
to send an EOF (e.g., a
TCP FIN segment), but the Onum
may still be reading from the
socket in a different thread.