Safe Haskell  Safe 

Language  Haskell2010 
Synopsis
 newtype Tap r s m = Tap {}
 consTap :: (Semigroup r, Applicative m) => s > Tap r s m > Tap r s m
 orderTap :: Semigroup r => r > Tap r s m > Tap r s m
 makeTap :: Monad m => m (Tap r s m) > Tap r s m
 transTap :: Functor n => (forall x. m x > n x) > Tap r s m > Tap r s n
 repeatTap :: Applicative m => s > Tap r s m
 repeatTapM :: Applicative m => m s > Tap r s m
 repeatTapM' :: Applicative m => m s > Tap () s m
 unfoldrTapM :: Applicative m => (r > s > m (a, s)) > s > Tap r a m
 newtype Joint r m s = Joint {}
 newtype Producer r s m a = Producer {
 unProducer :: (a > Tap r s m) > Tap r s m
 yield :: (Semigroup r, Applicative f, Applicative m) => s > Producer r (f s) m ()
 accept :: Monoid r => Producer r s m r
 inexhaustible :: Producer r s m x > Tap r s m
 tapProducer :: (Monoid r, Applicative m) => Producer r (Maybe s) m a > Tap r (Maybe s) m
 tapProducer' :: Applicative m => Producer () (Maybe s) m a > Tap () (Maybe s) m
 produce :: (Semigroup r, Applicative m) => s > Producer r s m ()
 newtype ListT r m s = ListT {}
 sample :: Foldable f => f s > ListT r m s
 inquire :: Monoid r => ListT r m r
 tapListT :: (Semigroup r, Applicative m) => ListT r m s > Tap r (Maybe s) m
 tapListT' :: Applicative m => ListT () m s > Tap () (Maybe s) m
 retractListT :: Monad m => ListT () m s > m ()
 consume :: (Monoid r, MonadSink (Tap r s) m) => m s
 leftover :: (Semigroup r, MonadSink (Tap r s) m) => s > m ()
 request :: (Semigroup r, MonadSink (Tap r s) m) => r > m ()
 prefetch :: (Monoid r, Semigroup r, MonadSink (Tap r s) m) => m s
 eof :: (Applicative m, Alternative f) => Tap r (f a) m
Tap
is a nonmonadic, endless producer of Tap
m r ss
. It takes a request
r
.
consTap :: (Semigroup r, Applicative m) => s > Tap r s m > Tap r s m Source #
Prepend a new element, delaying requests.
repeatTap :: Applicative m => s > Tap r s m Source #
repeatTapM :: Applicative m => m s > Tap r s m Source #
repeatTapM' :: Applicative m => m s > Tap () s m Source #
unfoldrTapM :: Applicative m => (r > s > m (a, s)) > s > Tap r a m Source #
(<*>
) zips two taps.
Instances
Functor m => Functor (Joint r m) Source #  
Applicative m => Applicative (Joint r m) Source #  
Producer
newtype Producer r s m a Source #
Monadic producer
Producer  

Instances
MonadState s m => MonadState s (Producer p q m) Source #  
MonadReader r m => MonadReader r (Producer p q m) Source #  
MonadSink t m => MonadSink t (Producer p q m) Source #  
MonadTrans (Producer r s) Source #  
Defined in Data.Drinkery.Tap  
Monad (Producer r s m) Source #  
Functor (Producer r s m) Source #  
Applicative (Producer r s m) Source #  
Defined in Data.Drinkery.Tap pure :: a > Producer r s m a # (<*>) :: Producer r s m (a > b) > Producer r s m a > Producer r s m b # liftA2 :: (a > b > c) > Producer r s m a > Producer r s m b > Producer r s m c # (*>) :: Producer r s m a > Producer r s m b > Producer r s m b # (<*) :: Producer r s m a > Producer r s m b > Producer r s m a #  
MonadIO m => MonadIO (Producer r s m) Source #  
Defined in Data.Drinkery.Tap 
yield :: (Semigroup r, Applicative f, Applicative m) => s > Producer r (f s) m () Source #
inexhaustible :: Producer r s m x > Tap r s m Source #
tapProducer :: (Monoid r, Applicative m) => Producer r (Maybe s) m a > Tap r (Maybe s) m Source #
tapProducer' :: Applicative m => Producer () (Maybe s) m a > Tap () (Maybe s) m Source #
Specialised runProducer
produce :: (Semigroup r, Applicative m) => s > Producer r s m () Source #
Produce one element. Orders are put off.
ListT
Backtracking producer a.k.a. "ListT done right".
Instances
MonadState s m => MonadState s (ListT p m) Source #  
MonadReader r m => MonadReader r (ListT p m) Source #  
MonadSink t m => MonadSink t (ListT p m) Source #  
MonadTrans (ListT r) Source #  
Defined in Data.Drinkery.Tap  
Monad (ListT r m) Source #  
Functor (ListT r m) Source #  
Applicative (ListT r m) Source #  
MonadIO m => MonadIO (ListT r m) Source #  
Defined in Data.Drinkery.Tap  
Alternative (ListT r m) Source #  
MonadPlus (ListT r m) Source #  
retractListT :: Monad m => ListT () m s > m () Source #
Sink
prefetch :: (Monoid r, Semigroup r, MonadSink (Tap r s) m) => m s Source #
Get one element without consuming.
End of stream
eof :: (Applicative m, Alternative f) => Tap r (f a) m Source #
End of stream