packages feed

mono-traversable 0.10.1.1 → 0.10.2

raw patch · 4 files changed

+24/−2 lines, 4 files

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.10.2++* Add `delete` and `deleteBy` methods to EqSequence [#94](https://github.com/snoyberg/mono-traversable/pull/94)+ ## 0.10.1.1  * Remove unneeded INLINEs [#90](https://github.com/snoyberg/mono-traversable/issues/90)
mono-traversable.cabal view
@@ -1,5 +1,5 @@ name:                mono-traversable-version:             0.10.1.1+version:             0.10.2 synopsis:            Type classes for mapping, folding, and traversing monomorphic containers description:         Monomorphic variants of the Functor, Foldable, and Traversable typeclasses. If you understand Haskell's basic typeclasses, you understand mono-traversable. In addition to what you are used to, it adds on an IsSequence typeclass and has code for marking data structures as non-empty. homepage:            https://github.com/snoyberg/mono-traversable
src/Data/GrowingAppend.hs view
@@ -22,7 +22,7 @@ import qualified Data.DList as DList import Data.DList.Instances () --- | olength (x <> y) >= olength x + olength y+-- | olength (x <> y) >= max (olength x) (olength y) class (Semigroup mono, MonoFoldable mono) => GrowingAppend mono  instance GrowingAppend (Seq.Seq a)
src/Data/Sequences.hs view
@@ -1262,6 +1262,18 @@     -- Equivalent to @'groupAllOn' id@     groupAll :: seq -> [seq]     groupAll = groupAllOn id++    -- |+    --+    -- @since 0.10.2+    delete :: Element seq -> seq -> seq+    delete = deleteBy (==)++    -- |+    --+    -- @since 0.10.2+    deleteBy :: (Element seq -> Element seq -> Bool) -> Element seq -> seq -> seq+    deleteBy eq x = fromList . List.deleteBy eq x . otoList     {-# INLINE splitElem #-}     {-# INLINE splitSeq #-}     {-# INLINE isPrefixOf #-}@@ -1271,6 +1283,8 @@     {-# INLINE stripSuffix #-}     {-# INLINE group #-}     {-# INLINE groupAll #-}+    {-# INLINE delete #-}+    {-# INLINE deleteBy #-}  {-# DEPRECATED elem "use oelem" #-} elem :: EqSequence seq => Element seq -> seq -> Bool@@ -1292,6 +1306,8 @@     isPrefixOf = List.isPrefixOf     isSuffixOf x y = List.isPrefixOf (List.reverse x) (List.reverse y)     isInfixOf = List.isInfixOf+    delete = List.delete+    deleteBy = List.deleteBy     {-# INLINE splitSeq #-}     {-# INLINE stripPrefix #-}     {-# INLINE stripSuffix #-}@@ -1299,6 +1315,8 @@     {-# INLINE isPrefixOf #-}     {-# INLINE isSuffixOf #-}     {-# INLINE isInfixOf #-}+    {-# INLINE delete #-}+    {-# INLINE deleteBy #-}  instance EqSequence S.ByteString where     splitElem sep s | S.null s = [S.empty]