tagged-exception-core-2.1.0.0: Reflect exceptions using phantom types.

Copyright(c) 2009 - 2015 Peter Trsko
LicenseBSD3
Maintainerpeter.trsko@gmail.com
Stabilitystable
PortabilityCPP, NoImplicitPrelude, PolyKinds, RankNTypes, DeriveDataTypeable, DeriveGeneric
Safe HaskellSafe
LanguageHaskell2010

Control.Monad.TaggedException.Internal.Throws

Description

Data type for associating monadic value with phantom type. In case of this library it will always be associated with a type of exception it may throw.

Synopsis

Documentation

newtype Throws e m a Source

Exception tag.

Constructors

Throws 

Fields

hideException :: m a

Hide one exception.

Instances

(Monoid w, MonadReader r m, MonadWriter w m, MonadState s m) => MonadRWS r w s (Throws k * e m) Source

Since 2.1.0.0

MonadError e m => MonadError e (Throws k * e' m) Source

Since 2.1.0.0

MonadReader r m => MonadReader r (Throws k * e m) Source

Since 2.1.0.0

MonadState s m => MonadState s (Throws k * e m) Source

Since 2.1.0.0

(Monoid w, MonadWriter w m) => MonadWriter w (Throws k * e m) Source

Since 2.1.0.0

MFunctor (Throws k * e) Source

Since 1.2.0.0.

MMonad (Throws k * e) Source

Since 1.2.0.0.

MonadTrans (Throws k * e) Source 
Monad m => Monad (Throws k * e m) Source 
Functor f => Functor (Throws k * e f) Source 
Applicative f => Applicative (Throws k * e f) Source 
Alternative f => Alternative (Throws k * e f) Source 
MonadPlus m => MonadPlus (Throws k * e m) Source 
MonadThrow m => MonadThrow (Throws k * e m) Source

Since 2.0.0.0.

MonadCatch m => MonadCatch (Throws k * e m) Source

Since 2.0.0.0.

MonadMask m => MonadMask (Throws k * e m) Source

Since 2.0.0.0.

MonadIO m => MonadIO (Throws k * e m) Source 
MonadCont m => MonadCont (Throws k * e m) Source

Since 2.1.0.0

Generic (Throws k k e m a) Source 
type Rep (Throws k k1 e m a) Source 

liftBindLike :: (m a -> (b -> m c) -> m d) -> Throws e m a -> (b -> Throws e m c) -> Throws e m d Source

Lift operations with type similar to monadic bind. In example:

(>>=) :: Monad m => m a -> (a -> m b) -> m b
catch
    :: IO a
    -> (IOError -> IO a)
    -> IO a
catch
    :: Exception e
    => IO a -> (e -> IO a) -> IO a

Since 1.2.0.0.

liftCCLike :: (((a -> m b) -> m' c) -> m'' d) -> ((a -> Throws e m b) -> Throws e m' c) -> Throws e m'' d Source

Lift operation with type similar to liftCC:

liftCC
    :: Monad m => ((a -> m b) -> m a) -> m a

Since 2.1.0.0

liftEmbedLike :: (forall a. m a -> Throws e n a) -> Throws e' m b -> Throws e n b Source

Generalized form of embed from instance MMonad (Throws e).

Since 2.1.0.0

liftHoistLike :: (forall a. m a -> n a) -> Throws e m b -> Throws e' n b Source

Generalized form of embed from instance MFunctor (Throws e).

Since 2.1.0.0

liftMask :: (((forall a. m a -> m a) -> m b) -> m b) -> ((forall a. Throws e m a -> Throws e m a) -> Throws e m b) -> Throws e m b Source

Lift operation similar to the one of mask.