garden
Maintainergatlin@niltag.net
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

CPS

Description

 
Synopsis

Delimited Continuation Monad Transformer

newtype CPS (result :: k) (m :: k -> Type) (answer :: Type) Source #

Constructors

CPS 

Fields

  • (#) :: (answer -> m result) -> m result
     

Instances

Instances details
MonadIO m => MonadIO (CPS () m) Source # 
Instance details

Defined in CPS

Methods

liftIO :: IO a -> CPS () m a Source #

HasFork m => Alternative (CPS () m) Source # 
Instance details

Defined in CPS

Methods

empty :: CPS () m a Source #

(<|>) :: CPS () m a -> CPS () m a -> CPS () m a Source #

some :: CPS () m a -> CPS () m [a] Source #

many :: CPS () m a -> CPS () m [a] Source #

Applicative (CPS r m) Source # 
Instance details

Defined in CPS

Methods

pure :: a -> CPS r m a Source #

(<*>) :: CPS r m (a -> b) -> CPS r m a -> CPS r m b Source #

liftA2 :: (a -> b -> c) -> CPS r m a -> CPS r m b -> CPS r m c Source #

(*>) :: CPS r m a -> CPS r m b -> CPS r m b Source #

(<*) :: CPS r m a -> CPS r m b -> CPS r m a Source #

Functor (CPS r m) Source # 
Instance details

Defined in CPS

Methods

fmap :: (a -> b) -> CPS r m a -> CPS r m b Source #

(<$) :: a -> CPS r m b -> CPS r m a Source #

Monad (CPS r m) Source # 
Instance details

Defined in CPS

Methods

(>>=) :: CPS r m a -> (a -> CPS r m b) -> CPS r m b Source #

(>>) :: CPS r m a -> CPS r m b -> CPS r m b Source #

return :: a -> CPS r m a Source #

HasFork m => MonadPlus (CPS () m) Source # 
Instance details

Defined in CPS

Methods

mzero :: CPS () m a Source #

mplus :: CPS () m a -> CPS () m a -> CPS () m a Source #

shift :: Monad m => ((a -> m r) -> CPS r m r) -> CPS r m a Source #

reset :: Monad m => CPS r m r -> m r Source #

Utilities

lift :: Monad m => m a -> CPS r m a Source #