Hello community,

here is the log from the commit of package ghc-withdependencies for 
openSUSE:Factory checked in at 2017-04-11 09:38:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-withdependencies (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-withdependencies.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-withdependencies"

Tue Apr 11 09:38:04 2017 rev:2 rq:483935 version:0.2.4

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-withdependencies/ghc-withdependencies.changes    
    2017-03-24 01:57:54.221751609 +0100
+++ 
/work/SRC/openSUSE:Factory/.ghc-withdependencies.new/ghc-withdependencies.changes
   2017-04-11 09:38:06.084935086 +0200
@@ -1,0 +2,5 @@
+Sun Oct 30 16:26:39 UTC 2016 - psim...@suse.com
+
+- Update to version 0.2.4 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  withdependencies-0.2.3.tar.gz

New:
----
  withdependencies-0.2.4.tar.gz

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

Other differences:
------------------
++++++ ghc-withdependencies.spec ++++++
--- /var/tmp/diff_new_pack.Ymfu2f/_old  2017-04-11 09:38:06.784836216 +0200
+++ /var/tmp/diff_new_pack.Ymfu2f/_new  2017-04-11 09:38:06.788835651 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-withdependencies
 #
-# 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,7 +19,7 @@
 %global pkg_name withdependencies
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.2.3
+Version:        0.2.4
 Release:        0
 Summary:        Run computations that depend on one or more elements in a 
stream
 License:        GPL-3.0+
@@ -30,6 +30,7 @@
 BuildRequires:  ghc-conduit-devel
 BuildRequires:  ghc-containers-devel
 BuildRequires:  ghc-mtl-devel
+BuildRequires:  ghc-profunctors-devel
 BuildRequires:  ghc-rpm-macros
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %if %{with tests}

++++++ withdependencies-0.2.3.tar.gz -> withdependencies-0.2.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/withdependencies-0.2.3/Control/Dependency.hs 
new/withdependencies-0.2.4/Control/Dependency.hs
--- old/withdependencies-0.2.3/Control/Dependency.hs    2014-08-22 
19:16:48.000000000 +0200
+++ new/withdependencies-0.2.4/Control/Dependency.hs    2016-10-27 
18:34:55.000000000 +0200
@@ -1,4 +1,5 @@
 {-# LANGUAGE GADTs #-}
+{-# LANGUAGE GADTs #-}
 -- | This module is a glorified wrapper over `Data.Map.Strict.lookup`. It
 -- let you define computations in an applicative way that "require" some
 -- optional values, defined by an identifier.
@@ -14,21 +15,29 @@
 -- > > computeRequire (M.fromList [("a", 12), ("c", 15)]) computation :: Maybe 
Int
 -- > Nothing
 --
-module Control.Dependency (Require, require, requireFilter, computeRequire, 
isComputable, triggersAnalyzer) where
+module Control.Dependency ( Require
+                          , require
+                          , requireFilter
+                          , computeRequire
+                          , isComputable
+                          , triggersAnalyzer
+                          ) where
 
 import Control.Applicative
 import qualified Data.Set as S
 import qualified Data.Foldable as F
+import Data.Profunctor
 
 -- | The main data type, used to model a computation that requires a list
 -- of named parameters (the "identifier"), that are linked to a "content",
 -- and that will yield a result of type "a".
 data Require identifier content a where
-    Require :: (identifier -> Bool) -> Require identifier content (identifier, 
content)
-    Pure    :: a                    -> Require identifier content a
-    Ap      :: Require identifier content (a -> b) -> Require identifier 
content a -> Require identifier content b
-    Alt     :: Require identifier content a -> Require identifier content a -> 
Require identifier content a
-    Empty   :: Require identifier content a
+    Require      :: (identifier -> Bool) -> Require identifier content 
(identifier, content)
+    Pure         :: a                    -> Require identifier content a
+    Ap           :: Require identifier content (a -> b) -> Require identifier 
content a -> Require identifier content b
+    Alt          :: Require identifier content a -> Require identifier content 
a -> Require identifier content a
+    Empty        :: Require identifier content a
+    HoistContent :: (content -> prevcontent) -> Require identifier prevcontent 
a -> Require identifier content a
 
 instance Functor (Require identifier content) where
     fmap f = Ap (Pure f)
@@ -41,6 +50,9 @@
     empty = Empty
     (<|>) = Alt
 
+instance Profunctor (Require identifier) where
+    dimap f g = fmap g . HoistContent f
+
 -- | This operator let you "require" a value in a computation.
 require :: Eq identifier => identifier -> Require identifier content content
 require = fmap snd . Require . (==)
@@ -61,6 +73,7 @@
                                    x:_ -> pure x
 computeRequire s (Ap r1 r2)  = computeRequire s r1 <*> computeRequire s r2
 computeRequire s (Alt r1 r2) = computeRequire s r1 <|> computeRequire s r2
+computeRequire s (HoistContent f r) = computeRequire (map (\(i,c) -> (i, f c)) 
s) r
 
 -- | Checks if a computation can be completed given a set of known identifiers.
 isComputable :: (Ord identifier, Eq identifier)
@@ -72,6 +85,7 @@
 isComputable s (Require i) = F.any i s
 isComputable s (Ap r1 r2)  = isComputable s r1 && isComputable s r2
 isComputable s (Alt r1 r2) = isComputable s r1 || isComputable s r2
+isComputable s (HoistContent _ f) = isComputable s f
 
 triggersAnalyzer :: identifier -> Require identifier content a -> Bool
 triggersAnalyzer _ Empty = False
@@ -79,3 +93,4 @@
 triggersAnalyzer s (Require i) = i s
 triggersAnalyzer s (Ap r1 r2) = triggersAnalyzer s r1 || triggersAnalyzer s r2
 triggersAnalyzer s (Alt r1 r2) = triggersAnalyzer s r1 || triggersAnalyzer s r2
+triggersAnalyzer s (HoistContent _ f) = triggersAnalyzer s f
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/withdependencies-0.2.3/withdependencies.cabal 
new/withdependencies-0.2.4/withdependencies.cabal
--- old/withdependencies-0.2.3/withdependencies.cabal   2016-05-25 
08:32:46.000000000 +0200
+++ new/withdependencies-0.2.4/withdependencies.cabal   2016-10-27 
18:35:44.000000000 +0200
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                withdependencies
-version:             0.2.3
+version:             0.2.4
 synopsis:            Run computations that depend on one or more elements in a 
stream.
 -- description:         
 license:             GPL-3
@@ -27,7 +27,8 @@
   build-depends:       base >=4.7 && <4.10,
                        containers == 0.5.*,
                        conduit == 1.2.*,
-                       mtl
+                       mtl,
+                       profunctors
   -- hs-source-dirs:      
   default-language:    Haskell2010
 


Reply via email to