Hello community,

here is the log from the commit of package ghc-recursion-schemes for 
openSUSE:Factory checked in at 2017-07-11 08:26:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-recursion-schemes (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-recursion-schemes.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-recursion-schemes"

Tue Jul 11 08:26:56 2017 rev:6 rq:509060 version:5.0.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-recursion-schemes/ghc-recursion-schemes.changes  
    2017-05-06 18:28:55.977310358 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-recursion-schemes.new/ghc-recursion-schemes.changes
 2017-07-11 08:26:58.989818608 +0200
@@ -1,0 +2,5 @@
+Fri Jun 30 03:01:54 UTC 2017 - [email protected]
+
+- Update to version 5.0.2.
+
+-------------------------------------------------------------------

Old:
----
  recursion-schemes-5.0.1.tar.gz
  recursion-schemes.cabal

New:
----
  recursion-schemes-5.0.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-recursion-schemes.spec ++++++
--- /var/tmp/diff_new_pack.sXG80K/_old  2017-07-11 08:26:59.917687731 +0200
+++ /var/tmp/diff_new_pack.sXG80K/_new  2017-07-11 08:26:59.917687731 +0200
@@ -19,14 +19,13 @@
 %global pkg_name recursion-schemes
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        5.0.1
+Version:        5.0.2
 Release:        0
 Summary:        Generalized bananas, lenses and barbed wire
 License:        BSD-2-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/1.cabal#/%{pkg_name}.cabal
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-base-orphans-devel
 BuildRequires:  ghc-bifunctors-devel
@@ -43,7 +42,8 @@
 %endif
 
 %description
-Generalized bananas, lenses and barbed wire.
+Recursion operators, see "Generalized bananas, lenses and barbed wire" by Erik
+Meijer, Maarten Fokkinga and Ross Paterson.
 
 %package devel
 Summary:        Haskell %{pkg_name} library development files
@@ -59,7 +59,6 @@
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %ghc_lib_build

++++++ recursion-schemes-5.0.1.tar.gz -> recursion-schemes-5.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/recursion-schemes-5.0.1/.travis.yml 
new/recursion-schemes-5.0.2/.travis.yml
--- old/recursion-schemes-5.0.1/.travis.yml     2016-12-13 20:50:34.000000000 
+0100
+++ new/recursion-schemes-5.0.2/.travis.yml     2017-06-26 22:59:16.000000000 
+0200
@@ -28,6 +28,9 @@
     - env: CABALVER=1.24 GHCVER=8.0.2
       compiler: ": #GHC 8.0.2"
       addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: 
[hvr-ghc]}}
+    - env: CABALVER=2.0 GHCVER=8.2.1
+      compiler: ": #GHC 8.2.1"
+      addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.1], sources: 
[hvr-ghc]}}
 
 before_install:
  - unset CC
@@ -57,7 +60,7 @@
      echo "cabal build-cache MISS";
      rm -rf $HOME/.cabsnap;
      mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
-     cabal install --only-dependencies --enable-tests --enable-benchmarks;
+     cabal install -j --only-dependencies --enable-tests --enable-benchmarks;
    fi
 
 # snapshot package-db on cache miss
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/recursion-schemes-5.0.1/CHANGELOG.markdown 
new/recursion-schemes-5.0.2/CHANGELOG.markdown
--- old/recursion-schemes-5.0.1/CHANGELOG.markdown      2016-12-13 
20:50:34.000000000 +0100
+++ new/recursion-schemes-5.0.2/CHANGELOG.markdown      2017-06-26 
22:59:16.000000000 +0200
@@ -1,3 +1,8 @@
+## 5.0.2
+* Support GHC-8.2.1
+* Fix Template Haskell derivation with non-default type renamer.
+* Add `Recursive` and `Corecursive Natural` instances, with `Base Natural = 
Maybe`.
+
 ## 5.0.1
 * Add `Data.Functor.Foldable.TH` module, which provides derivation of base 
functors via Template Haskell.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/recursion-schemes-5.0.1/Data/Functor/Foldable/TH.hs 
new/recursion-schemes-5.0.2/Data/Functor/Foldable/TH.hs
--- old/recursion-schemes-5.0.1/Data/Functor/Foldable/TH.hs     2016-12-13 
20:50:34.000000000 +0100
+++ new/recursion-schemes-5.0.2/Data/Functor/Foldable/TH.hs     2017-06-26 
22:59:16.000000000 +0200
@@ -86,7 +86,7 @@
     , _baseRulesField :: Name -> Name
     }
 
--- | Default 'BaseRules': prepend @F@ or @$@ to data type, constructors and 
field names.
+-- | Default 'BaseRules': append @F@ or @$@ to data type, constructors and 
field names.
 baseRules :: BaseRules
 baseRules = BaseRules
     { _baseRulesType  = toFName
@@ -96,19 +96,19 @@
 
 -- | How to name the base functor type.
 --
--- Default is to prepened @F@ or @$@.
+-- Default is to append @F@ or @$@.
 baseRulesType :: Functor f => ((Name -> Name) -> f (Name -> Name)) -> 
BaseRules -> f BaseRules
 baseRulesType f rules = (\x -> rules { _baseRulesType = x }) <$> f 
(_baseRulesType rules)
 
 -- | How to rename the base functor type constructors.
 --
--- Default is to prepened @F@ or @$@.
+-- Default is to append @F@ or @$@.
 baseRulesCon :: Functor f => ((Name -> Name) -> f (Name -> Name)) -> BaseRules 
-> f BaseRules
 baseRulesCon f rules = (\x -> rules { _baseRulesCon = x }) <$> f 
(_baseRulesCon rules)
 
 -- | How to rename the base functor type field names (in records).
 --
--- Default is to prepened @F@ or @$@.
+-- Default is to append @F@ or @$@.
 baseRulesField :: Functor f => ((Name -> Name) -> f (Name -> Name)) -> 
BaseRules -> f BaseRules
 baseRulesField f rules = (\x -> rules { _baseRulesField = x }) <$> f 
(_baseRulesField rules)
 
@@ -124,14 +124,14 @@
 makePrimForDec :: BaseRules -> Dec -> DecsQ
 makePrimForDec rules dec = case dec of
 #if MIN_VERSION_template_haskell(2,11,0)
-  DataD    _ tyName vars _ cons _ -> do
+  DataD    _ tyName vars _ cons _ ->
     makePrimForDec' rules False tyName vars cons
-  NewtypeD _ tyName vars _ con _ -> do
+  NewtypeD _ tyName vars _ con _ ->
     makePrimForDec' rules True tyName vars [con]
 #else
   DataD    _ tyName vars cons _ ->
     makePrimForDec' rules False tyName vars cons
-  NewtypeD _ tyName vars con _ -> do
+  NewtypeD _ tyName vars con _ ->
     makePrimForDec' rules True tyName vars [con]
 #endif
   _ -> fail "makeFieldOptics: Expected data type-constructor"
@@ -159,15 +159,30 @@
 
     -- Data definition
     let dataDec = case consF of
-          [conF] | isNewtype ->
 #if MIN_VERSION_template_haskell(2,11,0)
-              NewtypeD [] tyNameF varsF Nothing conF [ConT functorTypeName, 
ConT foldableTypeName, ConT traversableTypeName]
-          _ ->
-              DataD [] tyNameF varsF Nothing consF [ConT functorTypeName, ConT 
foldableTypeName, ConT traversableTypeName]
+            [conF] | isNewtype ->
+                NewtypeD [] tyNameF varsF Nothing conF deriveds
+            _ ->
+                DataD [] tyNameF varsF Nothing consF deriveds
 #else
-              NewtypeD [] tyNameF varsF conF [functorTypeName, 
foldableTypeName, traversableTypeName]
-          _ ->
-              DataD [] tyNameF varsF consF [functorTypeName, foldableTypeName, 
traversableTypeName]
+            [conF] | isNewtype ->
+                NewtypeD [] tyNameF varsF conF deriveds
+            _ ->
+                DataD [] tyNameF varsF consF deriveds
+#endif
+          where
+            deriveds =
+#if MIN_VERSION_template_haskell(2,12,0)
+              [DerivClause Nothing 
+                [ ConT functorTypeName
+                , ConT foldableTypeName
+                , ConT traversableTypeName ]]
+#elif MIN_VERSION_template_haskell(2,11,0)
+              [ ConT functorTypeName
+              , ConT foldableTypeName
+              , ConT traversableTypeName ]
+#else
+              [functorTypeName, foldableTypeName, traversableTypeName]
 #endif
 
     -- type instance Base
@@ -180,7 +195,7 @@
     -- instance Recursive
     args <- (traverse . traverse . traverse) (\_ -> newName "x") fieldCons
 
-    let projDec = FunD projectValName (mkMorphism id toFName args)
+    let projDec = FunD projectValName (mkMorphism id (_baseRulesCon rules) 
args)
 #if MIN_VERSION_template_haskell(2,11,0)
     let recursiveDec = InstanceD Nothing [] (ConT recursiveTypeName `AppT` s) 
[projDec]
 #else
@@ -188,7 +203,7 @@
 #endif
 
     -- instance Corecursive
-    let embedDec = FunD embedValName (mkMorphism toFName id args)
+    let embedDec = FunD embedValName (mkMorphism (_baseRulesCon rules) id args)
 #if MIN_VERSION_template_haskell(2,11,0)
     let corecursiveDec = InstanceD Nothing [] (ConT corecursiveTypeName `AppT` 
s) [embedDec]
 #else
@@ -341,7 +356,7 @@
     ModifierSymbol          -> True
     OtherSymbol             -> True
     DashPunctuation         -> True
-    OtherPunctuation        -> not (c `elem` "'\"")
+    OtherPunctuation        -> c `notElem` "'\""
     ConnectorPunctuation    -> c /= '_'
     _                       -> False
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/recursion-schemes-5.0.1/Data/Functor/Foldable.hs 
new/recursion-schemes-5.0.2/Data/Functor/Foldable.hs
--- old/recursion-schemes-5.0.1/Data/Functor/Foldable.hs        2016-12-13 
20:50:34.000000000 +0100
+++ new/recursion-schemes-5.0.2/Data/Functor/Foldable.hs        2017-06-26 
22:59:16.000000000 +0200
@@ -128,7 +128,7 @@
 import GHC.Generics (Generic1)
 #endif
 #endif
-
+import Numeric.Natural
 import Data.Monoid (Monoid (..))
 import Prelude
 
@@ -335,6 +335,13 @@
 instance Corecursive (NonEmpty a) where
   embed = (:|) <$> NEF.head <*> (maybe [] toList <$> NEF.tail)
 
+type instance Base Natural = Maybe
+instance Recursive Natural where
+  project 0 = Nothing
+  project n = Just (n - 1)
+instance Corecursive Natural where
+  embed = maybe 0 (+1)
+
 -- | Cofree comonads are Recursive/Corecursive
 type instance Base (Cofree f a) = CofreeF f a
 instance Functor f => Recursive (Cofree f a) where
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/recursion-schemes-5.0.1/examples/Expr.hs 
new/recursion-schemes-5.0.2/examples/Expr.hs
--- old/recursion-schemes-5.0.1/examples/Expr.hs        2016-12-13 
20:50:34.000000000 +0100
+++ new/recursion-schemes-5.0.2/examples/Expr.hs        2017-06-26 
22:59:16.000000000 +0200
@@ -4,8 +4,10 @@
 
 import Data.Functor.Foldable
 import Data.Functor.Foldable.TH
+import Language.Haskell.TH
 import Data.List (foldl')
 import Test.HUnit
+import Data.Functor.Identity
 
 data Expr a
     = Lit a
@@ -15,6 +17,16 @@
 
 makeBaseFunctor ''Expr
 
+data Expr2 a
+    = Lit2 a
+    | Add2 (Expr2 a) (Expr2 a)
+  deriving (Show)
+
+makeBaseFunctorWith (runIdentity $ return baseRules
+    >>= baseRulesCon (\_-> Identity $ mkName . (++ "'") . nameBase)
+    >>= baseRulesType (\_ -> Identity $ mkName . (++ "_") . nameBase)
+    ) ''Expr2
+
 expr1 :: Expr Int
 expr1 = Add (Lit 2) (Lit 3 :* [Lit 4])
 
@@ -41,11 +53,20 @@
     let lBar = cons 'b' $ cons 'a' $ cons 'r' $ nil
     "bar" @=? cata lAlg lBar
     lBar @=? ana lCoalg "bar"
+
+    let expr3 = Add2 (Lit2 21) $ Add2 (Lit2 11) (Lit2 10)
+    42 @=? cata evalAlg2 expr3
   where
+    -- Type signatures to test name generation
+    evalAlg :: ExprF Int Int -> Int
     evalAlg (LitF x)   = x
     evalAlg (AddF x y) = x + y
     evalAlg (x :*$ y) = foldl' (*) x y
 
+    evalAlg2 :: Expr2_ Int Int -> Int
+    evalAlg2 (Lit2' x)   = x
+    evalAlg2 (Add2' x y) = x + y
+
     divCoalg x
         | x < 5     = LitF x
         | even x    = 2 :*$ [x']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/recursion-schemes-5.0.1/recursion-schemes.cabal 
new/recursion-schemes-5.0.2/recursion-schemes.cabal
--- old/recursion-schemes-5.0.1/recursion-schemes.cabal 2016-12-13 
20:50:34.000000000 +0100
+++ new/recursion-schemes-5.0.2/recursion-schemes.cabal 2017-06-26 
22:59:16.000000000 +0200
@@ -1,6 +1,6 @@
 name:          recursion-schemes
 category:      Control, Recursion
-version:       5.0.1
+version:       5.0.2
 license:       BSD3
 cabal-version: >= 1.8
 license-file:  LICENSE
@@ -11,9 +11,12 @@
 bug-reports:   http://github.com/ekmett/recursion-schemes/issues
 copyright:     Copyright (C) 2008-2015 Edward A. Kmett
 synopsis:      Generalized bananas, lenses and barbed wire
-description:   Generalized bananas, lenses and barbed wire
+description:
+  Recursion operators, see
+  "Generalized bananas, lenses and barbed wire"
+  by Erik Meijer, Maarten Fokkinga and Ross Paterson.
 
-tested-with:   GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2
+tested-with:   GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, 
GHC==8.2.1
 
 build-type:    Simple
 extra-source-files: .travis.yml CHANGELOG.markdown .gitignore README.markdown
@@ -50,12 +53,15 @@
   if impl(ghc < 7.5)
     build-depends: ghc-prim
 
+  if impl(ghc < 7.10)
+    build-depends: nats
+
   exposed-modules:
     Data.Functor.Base
     Data.Functor.Foldable
 
   if flag(template-haskell)
-    build-depends: template-haskell >= 2.5.0.0 && < 2.12, base-orphans >= 
0.5.4 && <0.6
+    build-depends: template-haskell >= 2.5.0.0 && < 2.13, base-orphans >= 
0.5.4 && <0.7
     exposed-modules:
       Data.Functor.Foldable.TH
 
@@ -71,5 +77,7 @@
   ghc-options: -Wall -threaded
   build-depends:
     base,
-    HUnit <1.6,
-    recursion-schemes
+    HUnit <1.7,
+    recursion-schemes,
+    template-haskell >= 2.5.0.0 && < 2.13,
+    transformers     >= 0.2     && < 1


Reply via email to