Hello community, here is the log from the commit of package ghc-insert-ordered-containers for openSUSE:Factory checked in at 2017-03-20 17:07:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-insert-ordered-containers (Old) and /work/SRC/openSUSE:Factory/.ghc-insert-ordered-containers.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-insert-ordered-containers" Mon Mar 20 17:07:29 2017 rev:3 rq:477454 version:0.2.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-insert-ordered-containers/ghc-insert-ordered-containers.changes 2016-11-14 20:14:10.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-insert-ordered-containers.new/ghc-insert-ordered-containers.changes 2017-03-20 17:07:30.315301669 +0100 @@ -1,0 +2,5 @@ +Sun Feb 12 14:15:14 UTC 2017 - psim...@suse.com + +- Update to version 0.2.0.0 revision 4 with cabal2obs. + +------------------------------------------------------------------- Old: ---- insert-ordered-containers-0.1.0.1.tar.gz New: ---- insert-ordered-containers-0.2.0.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-insert-ordered-containers.spec ++++++ --- /var/tmp/diff_new_pack.9O8LV0/_old 2017-03-20 17:07:31.111189290 +0100 +++ /var/tmp/diff_new_pack.9O8LV0/_new 2017-03-20 17:07:31.111189290 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-insert-ordered-containers # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,14 +19,14 @@ %global pkg_name insert-ordered-containers %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.1.0.1 +Version: 0.2.0.0 Release: 0 Summary: Associative containers retating insertion order for traversals License: BSD-3-Clause Group: Development/Languages/Other Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/3.cabal#/%{pkg_name}.cabal +Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/4.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-aeson-devel BuildRequires: ghc-base-compat-devel @@ -85,5 +85,6 @@ %files devel -f %{name}-devel.files %defattr(-,root,root,-) +%doc CHANGELOG.md README.md %changelog ++++++ insert-ordered-containers-0.1.0.1.tar.gz -> insert-ordered-containers-0.2.0.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/insert-ordered-containers-0.1.0.1/CHANGELOG.md new/insert-ordered-containers-0.2.0.0/CHANGELOG.md --- old/insert-ordered-containers-0.1.0.1/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100 +++ new/insert-ordered-containers-0.2.0.0/CHANGELOG.md 2016-08-08 11:57:43.000000000 +0200 @@ -0,0 +1,3 @@ +- 0.2.0.0 + - Use `aeson-1` + - removed our `FromJSONKey` and `ToJSONKey` in favour of `aeson` variants diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/insert-ordered-containers-0.1.0.1/README.md new/insert-ordered-containers-0.2.0.0/README.md --- old/insert-ordered-containers-0.1.0.1/README.md 2016-03-07 21:49:09.000000000 +0100 +++ new/insert-ordered-containers-0.2.0.0/README.md 2016-05-02 12:26:09.000000000 +0200 @@ -1,3 +1,3 @@ # insert-ordered-containers -Associative containers retating insertion order for traversals. +Associative containers retaining insertion order for traversals. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/insert-ordered-containers-0.1.0.1/insert-ordered-containers.cabal new/insert-ordered-containers-0.2.0.0/insert-ordered-containers.cabal --- old/insert-ordered-containers-0.1.0.1/insert-ordered-containers.cabal 2016-03-09 02:29:14.000000000 +0100 +++ new/insert-ordered-containers-0.2.0.0/insert-ordered-containers.cabal 2016-08-08 11:57:43.000000000 +0200 @@ -1,9 +1,9 @@ --- This file has been generated from package.yaml by hpack version 0.8.0. +-- This file has been generated from package.yaml by hpack version 0.14.0. -- -- see: https://github.com/sol/hpack name: insert-ordered-containers -version: 0.1.0.1 +version: 0.2.0.0 synopsis: Associative containers retating insertion order for traversals. description: Associative containers retating insertion order for traversals. category: Web @@ -13,11 +13,12 @@ maintainer: Oleg Grenrus <oleg.gren...@iki.fi> license: BSD3 license-file: LICENSE -tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.1 +tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.1 build-type: Simple cabal-version: >= 1.10 extra-source-files: + CHANGELOG.md README.md source-repository head @@ -29,12 +30,12 @@ src ghc-options: -Wall build-depends: - base >=4.7 && <4.10 - , aeson >=0.8.0.2 && <0.12 + base >=4.6 && <4.10 + , aeson >=1.0.0.0 && <1.1 , base-compat >=0.6.0 && <0.10 , hashable >=1.2.3.3 && <1.4 - , lens >=4.7 && <4.14 - , semigroupoids >=4.3 && <5.1 + , lens >=4.7 && <4.15 + , semigroupoids >=4.3 && <5.2 , semigroups >=0.16.2.2 && <0.19 , text >=1.2.0.6 && <1.3 , transformers >=0.3.0.0 && <0.6 @@ -50,12 +51,12 @@ test ghc-options: -Wall build-depends: - base >=4.7 && <4.10 - , aeson >=0.8.0.2 && <0.12 + base >=4.6 && <4.10 + , aeson >=1.0.0.0 && <1.1 , base-compat >=0.6.0 && <0.10 , hashable >=1.2.3.3 && <1.4 - , lens >=4.7 && <4.14 - , semigroupoids >=4.3 && <5.1 + , lens >=4.7 && <4.15 + , semigroupoids >=4.3 && <5.2 , semigroups >=0.16.2.2 && <0.19 , text >=1.2.0.6 && <1.3 , transformers >=0.3.0.0 && <0.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/insert-ordered-containers-0.1.0.1/src/Data/HashMap/Strict/InsOrd.hs new/insert-ordered-containers-0.2.0.0/src/Data/HashMap/Strict/InsOrd.hs --- old/insert-ordered-containers-0.1.0.1/src/Data/HashMap/Strict/InsOrd.hs 2016-03-07 21:49:09.000000000 +0100 +++ new/insert-ordered-containers-0.2.0.0/src/Data/HashMap/Strict/InsOrd.hs 2016-08-08 11:57:43.000000000 +0200 @@ -62,9 +62,6 @@ fromList, toHashMap, fromHashMap, - -- * Aeson extras - FromJSONKey(..), - ToJSONKey(..), -- * Lenses hashMap, unorderedTraversal, @@ -81,23 +78,19 @@ import Control.Arrow (first, second) import Data.Aeson -import qualified Data.Aeson.Types as Aeson +import qualified Data.Aeson.Encoding as E import Data.Data (Data, Typeable) import qualified Data.Foldable as F import Data.Functor.Apply (Apply (..)) import Data.Functor.Bind (Bind (..)) import Data.Hashable (Hashable (..)) -import Data.List (sortBy, nub) +import Data.List (nub, sortBy) import Data.Maybe (fromMaybe) import Data.Ord (comparing) import Data.Semigroup (Semigroup (..)) -import Data.Text (Text) -import qualified Data.Text as T -import qualified GHC.Exts as Exts import Text.ParserCombinators.ReadPrec (prec) import Text.Read (Lexeme (..), Read (..), lexP, - parens, readListPrecDefault, - readMaybe) + parens, readListPrecDefault) import Control.Lens (At (..), FoldableWithIndex, FunctorWithIndex, Index, Iso, IxValue, @@ -108,6 +101,10 @@ import Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as HashMap +#if MIN_VERSION_base(4,7,0) +import qualified GHC.Exts as Exts +#endif + ------------------------------------------------------------------------------- -- Strict Pair Int a ------------------------------------------------------------------------------- @@ -199,78 +196,37 @@ hashWithSalt salt (InsOrdHashMap _ m) = hashWithSalt salt m +#if MIN_VERSION_base(4,7,0) instance (Eq k, Hashable k) => Exts.IsList (InsOrdHashMap k v) where type Item (InsOrdHashMap k v) = (k, v) fromList = fromList toList = toList +#endif ------------------------------------------------------------------------------- -- Aeson ------------------------------------------------------------------------------- -class ToJSONKey a where - toJSONKey :: a -> Text - - -- | Default implementations picks first element, if exists; - -- otherwise evaluates to @""@. - toJSONKeyList :: [a] -> Text - toJSONKeyList [] = T.empty - toJSONKeyList (x:_) = toJSONKey x - -instance ToJSONKey Char where - toJSONKey c = T.singleton c - toJSONKeyList = T.pack - -instance ToJSONKey Int where - toJSONKey = T.pack . show - -instance ToJSONKey a => ToJSONKey [a] where - toJSONKey = toJSONKeyList - -instance ToJSONKey Text where - toJSONKey = id +instance (ToJSONKey k) => ToJSON1 (InsOrdHashMap k) where + liftToJSON t _ = case toJSONKey :: ToJSONKeyFunction k of + ToJSONKeyText f _ -> object . fmap (\(k, v) -> (f k, t v)) . toList + ToJSONKeyValue f _ -> toJSON . fmap (\(k,v) -> toJSON (f k, t v)) . toList + + liftToEncoding t _ = case toJSONKey :: ToJSONKeyFunction k of + ToJSONKeyText _ f -> E.dict f t foldrWithKey + ToJSONKeyValue _ f -> E.list (liftToEncoding2 f (E.list f) t (E.list t)) . toList instance (ToJSONKey k, ToJSON v) => ToJSON (InsOrdHashMap k v) where - toJSON = object . fmap f . toList - where - f (k, v) = toJSONKey k .= v - -#if MIN_VERSION_aeson(0,10,0) - toEncoding = pairs . mconcat . fmap f . toList - where - f (k, v) = toJSONKey k .= v -#endif + toJSON = toJSON1 + toEncoding = toEncoding1 ------------------------------------------------------------------------------- --- | See https://github.com/bos/aeson/pull/341 -class FromJSONKey a where - parseJSONKey :: Text -> Aeson.Parser a - - -- | Default implementation parses into singleton list. 'String' @:(@ - parseJSONKeyList :: Text -> Aeson.Parser [a] - parseJSONKeyList t = (:[]) <$> parseJSONKey t - -instance FromJSONKey Char where - parseJSONKey t = case T.uncons t of - Just (c, r) | T.null r -> pure c - _ -> fail $ "Non-singleton json key for Char: " ++ T.unpack t - parseJSONKeyList = pure . T.unpack - -instance FromJSONKey Int where - parseJSONKey t = maybe (fail "Cannot parse Int key") return $ - readMaybe $ T.unpack t - -instance FromJSONKey a => FromJSONKey [a] where - parseJSONKey = parseJSONKeyList - -instance FromJSONKey Text where - parseJSONKey = pure +instance (Eq k, Hashable k, FromJSONKey k) => FromJSON1 (InsOrdHashMap k) where + liftParseJSON p pl v = fromList . HashMap.toList <$> liftParseJSON p pl v instance (Eq k, Hashable k, FromJSONKey k, FromJSON v) => FromJSON (InsOrdHashMap k v) where - parseJSON = withObject "OrdHasMap k v" $ \obj -> - fmap fromList $ traverse f $ HashMap.toList obj - where f (k, v) = (,) <$> parseJSONKey k <*> parseJSON v + parseJSON = parseJSON1 ------------------------------------------------------------------------------- -- Lens ++++++ insert-ordered-containers.cabal ++++++ --- /var/tmp/diff_new_pack.9O8LV0/_old 2017-03-20 17:07:31.207175737 +0100 +++ /var/tmp/diff_new_pack.9O8LV0/_new 2017-03-20 17:07:31.207175737 +0100 @@ -1,69 +1,66 @@ --- This file has been generated from package.yaml by hpack version 0.8.0. --- --- see: https://github.com/sol/hpack - -name: insert-ordered-containers -version: 0.1.0.1 -x-revision: 3 -synopsis: Associative containers retating insertion order for traversals. -description: Associative containers retating insertion order for traversals. -category: Web -homepage: https://github.com/phadej/insert-ordered-containers#readme -bug-reports: https://github.com/phadej/insert-ordered-containers/issues -author: Oleg Grenrus <oleg.gren...@iki.fi> -maintainer: Oleg Grenrus <oleg.gren...@iki.fi> -license: BSD3 -license-file: LICENSE -tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.1 -build-type: Simple -cabal-version: >= 1.10 - -extra-source-files: - README.md - -source-repository head - type: git - location: https://github.com/phadej/insert-ordered-containers - -library - hs-source-dirs: - src - ghc-options: -Wall - build-depends: - base >=4.7 && <4.10 - , aeson >=0.8.0.2 && <0.12 - , base-compat >=0.6.0 && <0.10 - , hashable >=1.2.3.3 && <1.4 - , lens >=4.7 && <4.16 - , semigroupoids >=4.3 && <5.2 - , semigroups >=0.16.2.2 && <0.19 - , text >=1.2.0.6 && <1.3 - , transformers >=0.3.0.0 && <0.6 - , unordered-containers >=0.2.7.0 && <0.3 - exposed-modules: - Data.HashMap.Strict.InsOrd - default-language: Haskell2010 - -test-suite ins-ord-containers-tests - type: exitcode-stdio-1.0 - main-is: Tests.hs - hs-source-dirs: - test - ghc-options: -Wall - build-depends: - base >=4.7 && <4.10 - , aeson >=0.8.0.2 && <0.12 - , base-compat >=0.6.0 && <0.10 - , hashable >=1.2.3.3 && <1.4 - , lens >=4.7 && <4.16 - , semigroupoids >=4.3 && <5.2 - , semigroups >=0.16.2.2 && <0.19 - , text >=1.2.0.6 && <1.3 - , transformers >=0.3.0.0 && <0.6 - , unordered-containers >=0.2.7.0 && <0.3 - , base - , insert-ordered-containers - , tasty >= 0.10.1.2 && <0.12 - , tasty-quickcheck >= 0.8.3.2 && <0.9 - , QuickCheck >=2.7.6 && <2.9 - default-language: Haskell2010 +name: insert-ordered-containers +version: 0.2.0.0 +x-revision: 4 +synopsis: Associative containers retating insertion order for traversals. +description: Associative containers retating insertion order for traversals. +category: Web +homepage: https://github.com/phadej/insert-ordered-containers#readme +bug-reports: https://github.com/phadej/insert-ordered-containers/issues +author: Oleg Grenrus <oleg.gren...@iki.fi> +maintainer: Oleg Grenrus <oleg.gren...@iki.fi> +license: BSD3 +license-file: LICENSE +tested-with: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.1 +build-type: Simple +cabal-version: >= 1.10 + +extra-source-files: + CHANGELOG.md + README.md + +source-repository head + type: git + location: https://github.com/phadej/insert-ordered-containers + +library + hs-source-dirs: + src + ghc-options: -Wall + build-depends: + base >=4.6 && <4.10 + , aeson >=1.0.0.0 && <1.2 + , base-compat >=0.6.0 && <0.10 + , hashable >=1.2.3.3 && <1.4 + , lens >=4.7 && <4.16 + , semigroupoids >=4.3 && <5.2 + , semigroups >=0.16.2.2 && <0.19 + , text >=1.2.0.6 && <1.3 + , transformers >=0.3.0.0 && <0.6 + , unordered-containers >=0.2.7.0 && <0.3 + exposed-modules: + Data.HashMap.Strict.InsOrd + default-language: Haskell2010 + +test-suite ins-ord-containers-tests + type: exitcode-stdio-1.0 + main-is: Tests.hs + hs-source-dirs: + test + ghc-options: -Wall + build-depends: + base + , aeson + , base-compat + , hashable + , lens + , semigroupoids + , semigroups + , text + , transformers + , unordered-containers + , base + , insert-ordered-containers + , tasty >= 0.10.1.2 && <0.12 + , tasty-quickcheck >= 0.8.3.2 && <0.9 + , QuickCheck >=2.7.6 && <2.10 + default-language: Haskell2010