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

Safe HaskellNone
LanguageHaskell2010

Potoki.Core.Produce

Synopsis

Documentation

newtype Produce element Source #

Passive producer of elements with support for early termination.

Automates the management of resources.

Constructors

Produce (IO (Fetch element, IO ())) 

Instances

Functor Produce Source # 

Methods

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

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

Applicative Produce Source # 

Methods

pure :: a -> Produce a #

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

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

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

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

Alternative Produce Source # 

Methods

empty :: Produce a #

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

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

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

list :: [input] -> Produce input Source #

transform :: Transform input output -> Produce input -> Produce output Source #