Hello community,
here is the log from the commit of package ghc-mono-traversable for
openSUSE:Factory checked in at 2016-01-07 00:25:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-mono-traversable (Old)
and /work/SRC/openSUSE:Factory/.ghc-mono-traversable.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-mono-traversable"
Changes:
--------
---
/work/SRC/openSUSE:Factory/ghc-mono-traversable/ghc-mono-traversable.changes
2015-11-26 17:02:46.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.ghc-mono-traversable.new/ghc-mono-traversable.changes
2016-01-07 00:25:17.000000000 +0100
@@ -1,0 +2,7 @@
+Tue Dec 15 16:49:38 UTC 2015 - [email protected]
+
+- update to 0.10.0.1
+* Remove Functor instance for MinLen
+* Instance for Data.Sequence.Seq is incorrect.
+
+-------------------------------------------------------------------
Old:
----
mono-traversable-0.9.3.tar.gz
New:
----
mono-traversable-0.10.0.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-mono-traversable.spec ++++++
--- /var/tmp/diff_new_pack.62I0XE/_old 2016-01-07 00:25:18.000000000 +0100
+++ /var/tmp/diff_new_pack.62I0XE/_new 2016-01-07 00:25:18.000000000 +0100
@@ -20,7 +20,7 @@
%bcond_with tests
Name: ghc-mono-traversable
-Version: 0.9.3
+Version: 0.10.0.1
Release: 0
Summary: Type classes for mapping, folding, and traversing monomorphic
containers
Group: System/Libraries
++++++ mono-traversable-0.9.3.tar.gz -> mono-traversable-0.10.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mono-traversable-0.9.3/ChangeLog.md
new/mono-traversable-0.10.0.1/ChangeLog.md
--- old/mono-traversable-0.9.3/ChangeLog.md 2015-08-24 09:57:21.000000000
+0200
+++ new/mono-traversable-0.10.0.1/ChangeLog.md 2015-12-13 09:10:48.000000000
+0100
@@ -1,3 +1,11 @@
+## 0.10.0.1
+
+* Instance for Data.Sequence.Seq is incorrect.
[#83](https://github.com/snoyberg/mono-traversable/issues/83)
+
+## 0.10.0
+
+* Remove `Functor` instance for `MinLen`
[#82](https://github.com/snoyberg/mono-traversable/issues/82)
+
## 0.9.3
* Added `intercalate`, `splitWhen`, `splitElem`, and `splitSeq`
[#80](https://github.com/snoyberg/mono-traversable/pull/80)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mono-traversable-0.9.3/mono-traversable.cabal
new/mono-traversable-0.10.0.1/mono-traversable.cabal
--- old/mono-traversable-0.9.3/mono-traversable.cabal 2015-08-24
09:57:21.000000000 +0200
+++ new/mono-traversable-0.10.0.1/mono-traversable.cabal 2015-12-13
09:10:48.000000000 +0100
@@ -1,5 +1,5 @@
name: mono-traversable
-version: 0.9.3
+version: 0.10.0.1
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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mono-traversable-0.9.3/src/Data/MinLen.hs
new/mono-traversable-0.10.0.1/src/Data/MinLen.hs
--- old/mono-traversable-0.9.3/src/Data/MinLen.hs 2015-08-24
09:57:21.000000000 +0200
+++ new/mono-traversable-0.10.0.1/src/Data/MinLen.hs 2015-12-13
09:10:48.000000000 +0100
@@ -162,7 +162,7 @@
newtype MinLen nat mono =
MinLen {
unMinLen :: mono -- ^ Get the monomorphic container out of a 'MinLen'
wrapper.
- } deriving (Eq, Ord, Read, Show, Data, Typeable, Functor)
+ } deriving (Eq, Ord, Read, Show, Data, Typeable)
type instance Element (MinLen nat mono) = Element mono
deriving instance MonoFunctor mono => MonoFunctor (MinLen nat mono)
@@ -176,6 +176,9 @@
{-# INLINE omapM #-}
deriving instance GrowingAppend mono => GrowingAppend (MinLen nat mono)
+-- | This function is unsafe, and must not be exposed from this module.
+unsafeMap :: (mono -> mono) -> MinLen nat mono -> MinLen nat mono
+unsafeMap f (MinLen x) = MinLen (f x)
instance GrowingAppend mono => Semigroup (MinLen nat mono) where
MinLen x <> MinLen y = MinLen (x <> y)
@@ -183,12 +186,12 @@
instance SemiSequence seq => SemiSequence (MinLen nat seq) where
type Index (MinLen nat seq) = Index seq
- intersperse e = fmap $ intersperse e
- reverse = fmap reverse
+ intersperse e = unsafeMap $ intersperse e
+ reverse = unsafeMap reverse
find f = find f . unMinLen
- cons x = fmap $ cons x
- snoc xs x = fmap (flip snoc x) xs
- sortBy f = fmap $ sortBy f
+ cons x = unsafeMap $ cons x
+ snoc xs x = unsafeMap (flip snoc x) xs
+ sortBy f = unsafeMap $ sortBy f
instance MonoPointed mono => MonoPointed (MinLen Zero mono) where
opoint = MinLen . opoint
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mono-traversable-0.9.3/src/Data/MonoTraversable.hs
new/mono-traversable-0.10.0.1/src/Data/MonoTraversable.hs
--- old/mono-traversable-0.9.3/src/Data/MonoTraversable.hs 2015-08-24
09:57:21.000000000 +0200
+++ new/mono-traversable-0.10.0.1/src/Data/MonoTraversable.hs 2015-12-13
09:10:48.000000000 +0100
@@ -571,7 +571,7 @@
{-# INLINE omapM_ #-}
instance MonoFoldable (Tree a)
instance MonoFoldable (Seq a) where
- headEx = flip Seq.index 1
+ headEx = flip Seq.index 0
lastEx xs = Seq.index xs (Seq.length xs - 1)
{-# INLINE headEx #-}
{-# INLINE lastEx #-}
@@ -1297,4 +1297,3 @@
EmptyR -> Seq.empty
ys :> y -> ys Seq.|> y
) :> f w
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mono-traversable-0.9.3/test/Spec.hs
new/mono-traversable-0.10.0.1/test/Spec.hs
--- old/mono-traversable-0.9.3/test/Spec.hs 2015-08-24 09:57:21.000000000
+0200
+++ new/mono-traversable-0.10.0.1/test/Spec.hs 2015-12-13 09:10:48.000000000
+0100
@@ -457,3 +457,6 @@
it "#31 find doesn't infinitely loop on NonEmpty" $
find (== "a") ("a" NE.:| ["d","fgf"]) @?= Just "a"
+ it "#83 head on Seq works correctly" $ do
+ headEx (Seq.fromList [1 :: Int,2,3]) @?= (1 :: Int)
+ headMay (Seq.fromList [] :: Seq.Seq Int) @?= Nothing