oath-0.0: Composable concurrent computation done right
Safe HaskellNone
LanguageHaskell2010

Oath

Synopsis

Documentation

newtype Oath a Source #

Constructors

Oath 

Fields

Instances

Instances details
Functor Oath Source # 
Instance details

Defined in Oath

Methods

fmap :: (a -> b) -> Oath a -> Oath b #

(<$) :: a -> Oath b -> Oath a #

Applicative Oath Source # 
Instance details

Defined in Oath

Methods

pure :: a -> Oath a #

(<*>) :: Oath (a -> b) -> Oath a -> Oath b #

liftA2 :: (a -> b -> c) -> Oath a -> Oath b -> Oath c #

(*>) :: Oath a -> Oath b -> Oath b #

(<*) :: Oath a -> Oath b -> Oath a #

Alternative Oath Source # 
Instance details

Defined in Oath

Methods

empty :: Oath a #

(<|>) :: Oath a -> Oath a -> Oath a #

some :: Oath a -> Oath [a] #

many :: Oath a -> Oath [a] #

Semigroup a => Semigroup (Oath a) Source # 
Instance details

Defined in Oath

Methods

(<>) :: Oath a -> Oath a -> Oath a #

sconcat :: NonEmpty (Oath a) -> Oath a #

stimes :: Integral b => b -> Oath a -> Oath a #

Monoid a => Monoid (Oath a) Source # 
Instance details

Defined in Oath

Methods

mempty :: Oath a #

mappend :: Oath a -> Oath a -> Oath a #

mconcat :: [Oath a] -> Oath a #

hoistOath :: (forall x. STM x -> STM x) -> Oath a -> Oath a Source #

evalOath :: Oath a -> IO a Source #

oath :: IO a -> Oath a Source #

Lift an IO action into an Oath, forking a thread. When the continuation terminates, it kills the thread. Exception thrown in the thread will be propagated to the result.

delay :: Int -> Oath () Source #

An Oath that finishes once the given number of microseconds elapses

timeout :: Int -> Oath a -> Oath (Maybe a) Source #

Wrap an Oath