io-choice-0.0.5: Choice for IO and lifted IO

Safe Haskell | Safe-Inferred

Control.Exception.IOChoice

Description

This package provides the choice operator (`||>`) for IO monad.

Synopsis

- (||>) :: IO a -> IO a -> IO a
- goNext :: IO a
- runAnyOne :: [IO a] -> IO a

# Documentation

(||>) :: IO a -> IO a -> IO aSource

If `IOException` occurs or `goNext` is used in the left IO, then the right IO is performed. Note that `fail` throws `IOException`.

goNext :: IO aSource

Go to the next `IO` monad by throwing `IOException`.

runAnyOne :: [IO a] -> IO aSource

Run any one `IO` monad.