potoki-core-0.12: Low-level components of "potoki"

Safe HaskellNone
LanguageHaskell2010

Potoki.Core.Fetch

Contents

Synopsis

Documentation

newtype Fetch element Source #

Passive producer of elements.

Constructors

Fetch (IO (Maybe element)) 

duplicate :: Fetch element -> IO (Fetch element, Fetch element) Source #

list :: IORef [element] -> Fetch element Source #

rightHandlingLeft :: (left -> IO ()) -> Fetch (Either left right) -> Fetch right Source #

rightCachingLeft :: IORef (Maybe left) -> Fetch (Either left right) -> Fetch right Source #

eitherFetchingRight :: IORef (Maybe left) -> Fetch right -> Fetch (Either left right) Source #

signaling :: IO () -> IO () -> Fetch a -> Fetch a Source #

Orphan instances

Monad Fetch Source # 

Methods

(>>=) :: Fetch a -> (a -> Fetch b) -> Fetch b #

(>>) :: Fetch a -> Fetch b -> Fetch b #

return :: a -> Fetch a #

fail :: String -> Fetch a #

Functor Fetch Source # 

Methods

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

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

Applicative Fetch Source # 

Methods

pure :: a -> Fetch a #

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

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

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

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

MonadPlus Fetch Source # 

Methods

mzero :: Fetch a #

mplus :: Fetch a -> Fetch a -> Fetch a #

Alternative Fetch Source # 

Methods

empty :: Fetch a #

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

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

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

MonadIO Fetch Source # 

Methods

liftIO :: IO a -> Fetch a #