polytree 0.0.5 → 0.0.6
raw patch · 3 files changed
+15/−1 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Data.PolyTree: foldTreeM_ :: (Monad m, Traversable f) => (b -> m x) -> (a -> f x -> m x) -> Tree f a b -> m ()
Files
- changelog.md +4/−0
- polytree.cabal +1/−1
- src/Data/PolyTree.hs +10/−0
changelog.md view
@@ -1,3 +1,7 @@+0.0.6++* Add `foldTreeM_`+ 0.0.5 * Add `nodeA` constructor function
polytree.cabal view
@@ -1,5 +1,5 @@ name: polytree-version: 0.0.5+version: 0.0.6 synopsis: A polymorphic rose-tree description: A rose-tree which has different data in the nodes and leaves license: BSD3
src/Data/PolyTree.hs view
@@ -27,6 +27,7 @@ import Data.Bifoldable ( Bifoldable(bifoldMap) ) import Data.Bifunctor ( Bifunctor(bimap) ) import Data.Bitraversable ( Bitraversable(..) )+import Data.Functor ( void ) import Data.Functor.Apply ( Apply((<.>)) ) import Data.Functor.Bind ( Bind((>>-)) ) import Data.Functor.Classes@@ -439,6 +440,15 @@ l b foldTreeM l n (Node a t) = traverse (foldTreeM l n) t >>= n a++foldTreeM_ ::+ (Monad m, Traversable f) =>+ (b -> m x) ->+ (a -> f x -> m x)+ -> Tree f a b+ -> m ()+foldTreeM_ l n t =+ void (foldTreeM l n t) -- | --