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


-- | `bracket`-like functions for `ExceptT` over `IO` monad.
--   
--   Please see the README on GitHub at
--   <a>https://github.com/A1-Triard/errors-ext#readme</a>
@package errors-ext
@version 0.4.2


-- | This module exports <a>bracket</a>-like functions for
--   <tt><a>ExceptT</a> e <a>IO</a></tt>.
module Control.Error.Extensions

-- | Analogous to <a>bracket</a>, but for <tt><a>ExceptT</a> e
--   <a>IO</a></tt> (or any <a>MonadError</a> allowing <a>bracket</a>
--   lifting).
bracketE :: (MonadBaseControl IO m, MonadError e m) => m a -> (a -> m b) -> (a -> m c) -> m c

-- | A variant of <a>bracketE</a> where the return value from the first
--   computation is not required.
bracketE_ :: (MonadBaseControl IO m, MonadError e m) => m a -> m b -> m c -> m c

-- | Converts <a>Either</a> to <a>Maybe</a>. Specialization of
--   <a>either</a>.
--   
--   <pre>
--   <a>maybeEither</a> . eitherMaybe = <a>id</a>
--   </pre>
eitherMaybe :: Either () a -> Maybe a

-- | Converts <a>Maybe</a> to <a>Either</a>. Specialization of
--   <a>maybe</a>.
--   
--   <pre>
--   maybeEither . <a>eitherMaybe</a> = <a>id</a>
--   </pre>
maybeEither :: Maybe a -> Either () a

-- | Removes left zero term from sum type. Specialization of <a>either</a>.
eitherVoidL :: Either Void a -> a

-- | Removes right zero term from sum type. Specialization of
--   <a>either</a>.
eitherVoidR :: Either a Void -> a
