handle package:streamly
When evaluating a stream if an exception occurs, stream evaluation
aborts and the specified exception handler is run with the exception
as argument.
Inhibits stream fusion
Read lines from an IO Handle into a stream of Strings.
Like
handle but the exception handler is also provided with the
stream that generated the exception as input. The exception handler
can thus re-evaluate the stream to retry the action that failed. The
exception handler can again call
ghandle on it to retry the
action multiple times.
This is highly experimental. In a stream of actions we can map the
stream with a retry combinator to retry each action on failure.
Inhibits stream fusion
Pre-release
toHandle h = D.mapM_ $ hPutStrLn h
Write a stream of Strings to an IO Handle.