dunai-0.2.0.0: Generalised reactive framework supporting classic, arrowized and monadic FRP.

Safe HaskellSafe
LanguageHaskell2010

Control.Monad.Trans.MSF.Except

Contents

Synopsis

Throwing exceptions

throwOnCond :: Monad m => (a -> Bool) -> e -> MSF (ExceptT e m) a a Source #

throwOnCondM :: Monad m => (a -> m Bool) -> e -> MSF (ExceptT e m) a a Source #

throwOn :: Monad m => e -> MSF (ExceptT e m) Bool () Source #

throwOn' :: Monad m => MSF (ExceptT e m) (Bool, e) () Source #

throwMaybe :: Monad m => MSF (ExceptT e m) (Maybe e) (Maybe a) Source #

throwS :: Monad m => MSF (ExceptT e m) e a Source #

throw :: Monad m => e -> MSF (ExceptT e m) a b Source #

pass :: Monad m => MSF (ExceptT e m) a a Source #

maybeToExceptS :: Monad m => MSF (MaybeT m) a b -> MSF (ExceptT () m) a b Source #

Whenever Nothing is thrown, throw '()' instead.

Catching exceptions

catchS :: Monad m => MSF (ExceptT e m) a b -> (e -> MSF m a b) -> MSF m a b Source #

untilE :: Monad m => MSF m a b -> MSF m b (Maybe e) -> MSF (ExceptT e m) a b Source #

exceptS :: Monad m => MSF (ExceptT e m) a b -> MSF m a (Either e b) Source #

inExceptT :: Monad m => MSF (ExceptT e m) (ExceptT e m a) a Source #

Monad interface for Exception MSFs

newtype MSFExcept m a b e Source #

Constructors

MSFExcept 

Fields

Instances

Monad m => Monad (MSFExcept m a b) Source # 

Methods

(>>=) :: MSFExcept m a b a -> (a -> MSFExcept m a b b) -> MSFExcept m a b b #

(>>) :: MSFExcept m a b a -> MSFExcept m a b b -> MSFExcept m a b b #

return :: a -> MSFExcept m a b a #

fail :: String -> MSFExcept m a b a #

Monad m => Functor (MSFExcept m a b) Source # 

Methods

fmap :: (a -> b) -> MSFExcept m a b a -> MSFExcept m a b b #

(<$) :: a -> MSFExcept m a b b -> MSFExcept m a b a #

Monad m => Applicative (MSFExcept m a b) Source # 

Methods

pure :: a -> MSFExcept m a b a #

(<*>) :: MSFExcept m a b (a -> b) -> MSFExcept m a b a -> MSFExcept m a b b #

(*>) :: MSFExcept m a b a -> MSFExcept m a b b -> MSFExcept m a b b #

(<*) :: MSFExcept m a b a -> MSFExcept m a b b -> MSFExcept m a b a #

try :: MSF (ExceptT e m) a b -> MSFExcept m a b e Source #

currentInput :: Monad m => MSFExcept m e b e Source #

Immediately throw the current input as an exception.

safely :: Monad m => MSFExcept m a b Empty -> MSF m a b Source #

safe :: Monad m => MSF m a b -> MSFExcept m a b e Source #

once :: Monad m => (a -> m e) -> MSFExcept m a b e Source #

once_ :: Monad m => m e -> MSFExcept m a b e Source #

step :: Monad m => (a -> m (b, e)) -> MSFExcept m a b e Source #

Advances a single tick with the given Kleisli arrow, and then throws an exception.

tagged :: Monad m => MSF (ExceptT e1 m) a b -> MSF (ExceptT e2 m) (a, e2) b Source #