-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Choice for IO and lifted IO
--   
--   Choice for IO and lifted IO
@package io-choice
@version 0.0.6


-- | This package provides a function to generate a choice operator in IO
--   monad by specifying exceptions to be caught.
module Control.Exception.IOChoice.TH

-- | A function to generate a choice operator in IO monad.
--   <a>IOException</a> is automatically added to specified exceptions. So,
--   <a>goNext</a> can be used with the new operator.
--   
--   <pre>
--   {-# LANGUAGE TemplateHaskell #-}
--   import Control.Exception
--   import Control.Exception.IOChoice.TH
--   
--   (||&gt;&gt;) :: IO a -&gt; IO a -&gt; IO a
--   (||&gt;&gt;) = $(newIOChoice [''ErrorCall, ''ArithException])
--   </pre>
newIOChoice :: [Name] -> ExpQ


-- | This package provides a function to generate a choice operator in
--   lifted IO monad by specifying exceptions to be caught.
module Control.Exception.IOChoice.Lifted.TH

-- | A function to generate a choice operator in lifted IO monad.
--   <a>IOException</a> is automatically added to specified exceptions. So,
--   <a>goNext</a> can be used with the new operator.
--   
--   <pre>
--   {-# LANGUAGE TemplateHaskell #-}
--   import Control.Exception
--   import Control.Exception.IOChoice.Lifted.TH
--   
--   (||&gt;&gt;) :: MonadBaseControl IO m =&gt; m a -&gt; m a -&gt; m a
--   (||&gt;&gt;) = $(newIOChoice [''ErrorCall, ''ArithException])
--   </pre>
newIOChoice :: [Name] -> ExpQ


-- | This package provides the choice operator (<a>||&gt;</a>) for lifted
--   IO monad.
module Control.Exception.IOChoice.Lifted

-- | If <a>IOException</a> occurs or <a>goNext</a> is used in the left
--   monad, then the right monad is performed. Note that <a>fail</a> throws
--   <a>IOException</a>.
(||>) :: MonadBaseControl IO m => m a -> m a -> m a
infixr 3 ||>

-- | Go to the next <a>IO</a> monad by throwing <a>IOException</a>.
goNext :: (MonadIO m, MonadBase IO m) => m a

-- | Run any one lifted <a>IO</a> monad.
runAnyOne :: (MonadIO m, MonadBaseControl IO m) => [m a] -> m a


-- | This package provides the choice operator (<a>||&gt;</a>) for IO
--   monad.
module Control.Exception.IOChoice

-- | If <a>IOException</a> occurs or <a>goNext</a> is used in the left IO,
--   then the right IO is performed. Note that <a>fail</a> throws
--   <a>IOException</a>.
(||>) :: IO a -> IO a -> IO a
infixr 3 ||>

-- | Go to the next <a>IO</a> monad by throwing <a>IOException</a>.
goNext :: IO a

-- | Run any one <a>IO</a> monad.
runAnyOne :: [IO a] -> IO a
