-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Add support for non empty streams to Streaming lib -- -- Please see the README on GitHub at -- https://gitlab.com/paolo.veronelli/streaming-nonempty/-/blob/master/README.md @package streaming-nonempty @version 0.1.0.0 module Streaming.NonEmpty -- | A stream with at least one functorial layer newtype NEStream f m a NEStream :: f (Stream f m a) -> NEStream f m a -- | Is a stream toStream :: (Functor f, Monad m) => NEStream f m r -> Stream f m r -- | fold1 is safe fold1 :: Monad m => (a -> a -> a) -> NEStream (Of a) m r -> m (Of a r) -- | sconcat as in Semigroup, with result sconcat :: (Semigroup a, Monad m) => NEStream (Of a) m r -> m (Of a r) -- | harvest the list with the result toNonEmpty :: Monad m => NEStream (Of a) m r -> m (Of (NonEmpty a) r) -- | harvest the list only toNonEmpty_ :: Monad m => NEStream (Of a) m r -> m (NonEmpty a) -- | sconcat as in Semigroup sconcat_ :: (Monad m, Semigroup a) => NEStream (Of a) m r -> m a -- | group by some equality in non empty groups groupBy :: Monad m => (a -> a -> Bool) -> Stream (Of a) m r -> Stream (NEStream (Of a) m) m r -- | what groupBy could be groupByPure :: (a -> a -> Bool) -> [a] -> [NonEmpty a] -- | collapse semigroups by some equality groupSemigroupBy :: (Semigroup a, Monad m) => (a -> a -> Bool) -> Stream (Of a) m r -> Stream (Of a) m r -- | what should be possible to do with groupBy fmap sconcat . -- groupBy equals groupSemigroupByPure :: Semigroup b => (b -> b -> Bool) -> [b] -> [b] instance (GHC.Base.Monad m, GHC.Base.Functor f) => GHC.Base.Functor (Streaming.NonEmpty.NEStream f m)