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

Safe HaskellSafe
LanguageHaskell98

Control.Exception.IOChoice.Lifted

Description

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

Synopsis

Documentation

(||>) :: MonadBaseControl IO m => m a -> m a -> m a infixr 3 Source

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

goNext :: (MonadIO m, MonadBase IO m) => m a Source

Go to the next IO monad by throwing IOException.

runAnyOne :: (MonadIO m, MonadBaseControl IO m) => [m a] -> m a Source

Run any one lifted IO monad.