streaming-nonempty 0.1.0.0 → 0.1.0.1
raw patch · 3 files changed
+8/−2 lines, 3 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Streaming.NonEmpty: map :: Monad m => (t -> b) -> NEStream (Of t) m a -> NEStream (Of b) m a
Files
- ChangeLog.md +1/−0
- src/Streaming/NonEmpty.hs +6/−1
- streaming-nonempty.cabal +1/−1
ChangeLog.md view
@@ -1,3 +1,4 @@ # Changelog for streaming-nonempty ## Unreleased changes+* 0.1.0.1 add map and other basic API
src/Streaming/NonEmpty.hs view
@@ -10,12 +10,13 @@ import Data.Eq ((==)) import Data.Function (($)) import Data.Functor (Functor, fmap, (<$>))-import Data.List.NonEmpty hiding (groupBy)+import Data.List.NonEmpty hiding (groupBy, map) import Data.Semigroup (Semigroup, (<>)) import qualified Data.Semigroup as Semigroup import Streaming (Of ((:>)), Stream, first, runIdentity, wrap) import Streaming.Internal import qualified Streaming.Prelude as S+import Prelude hiding ((.), map, id) -- | A stream with at least one functorial layer newtype NEStream f m a = NEStream (f (Stream f m a)) deriving (Functor)@@ -23,6 +24,10 @@ -- | Is a stream toStream :: (Functor f, Monad m) => NEStream f m r -> Stream f m r toStream (NEStream f) = wrap f++map :: Monad m => (t -> b) -> NEStream (Of t) m a -> NEStream (Of b) m a+map f (NEStream (x :> s)) = NEStream (f x :> S.map f s)+ -- | fold1 is safe fold1 :: Monad m => (a -> a -> a) -> NEStream (Of a) m r -> m (Of a r)
streaming-nonempty.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: streaming-nonempty-version: 0.1.0.0+version: 0.1.0.1 synopsis: Add support for non empty streams to Streaming lib description: Please see the README on GitHub at <https://gitlab.com/paolo.veronelli/streaming-nonempty/-/blob/master/README.md> category: Streaming