io-streams-1.5.2.2: Simple, composable, and easy-to-use stream I/O

Safe Haskell | None
Language | Haskell2010

System.IO.Streams.Debug

Contents

- Debuggers

Description

Convenience module for debugging streams. Provides stream transformers that wrap `InputStream`s and `OutputStream`s, sending a description of all data to an `OutputStream` for debugging.

Synopsis

- debugInput :: (a -> ByteString) -> ByteString -> OutputStream ByteString -> InputStream a -> IO (InputStream a)
- debugOutput :: (a -> ByteString) -> ByteString -> OutputStream ByteString -> OutputStream a -> IO (OutputStream a)
- debugInputBS :: ByteString -> OutputStream ByteString -> InputStream ByteString -> IO (InputStream ByteString)
- debugOutputBS :: ByteString -> OutputStream ByteString -> OutputStream ByteString -> IO (OutputStream ByteString)

# Debuggers

debugInput Source #

Arguments

:: (a -> ByteString) | function to convert stream elements to `ByteString`
-> ByteString | name of this debug stream, will be prepended to debug output
-> OutputStream ByteString | stream the debug info will be sent to
-> InputStream a | input stream
-> IO (InputStream a) |

debugOutput Source #

Arguments

:: (a -> ByteString) | function to convert stream elements to `ByteString`
-> ByteString | name of this debug stream, will be prepended to debug output
-> OutputStream ByteString | debug stream
-> OutputStream a | output stream
-> IO (OutputStream a) |

debugInputBS Source #

Arguments

:: ByteString | name of this debug stream, will be prepended to debug output
-> OutputStream ByteString | stream the debug info will be sent to
-> InputStream ByteString | input stream
-> IO (InputStream ByteString) |

debugOutputBS Source #

Arguments

:: ByteString | name of this debug stream, will be prepended to debug output
-> OutputStream ByteString | stream the debug info will be sent to
-> OutputStream ByteString | output stream
-> IO (OutputStream ByteString) |