Hello community,

here is the log from the commit of package ghc-machines-directory for 
openSUSE:Factory checked in at 2017-07-23 12:14:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-machines-directory (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-machines-directory.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-machines-directory"

Sun Jul 23 12:14:38 2017 rev:2 rq:511915 version:0.2.1.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/ghc-machines-directory/ghc-machines-directory.changes
    2017-05-10 20:45:39.603972380 +0200
+++ 
/work/SRC/openSUSE:Factory/.ghc-machines-directory.new/ghc-machines-directory.changes
       2017-07-23 12:14:39.833507006 +0200
@@ -1,0 +2,5 @@
+Tue Mar 14 09:25:59 UTC 2017 - psim...@suse.com
+
+- Update to version 0.2.1.0 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  machines-directory-0.2.0.10.tar.gz

New:
----
  machines-directory-0.2.1.0.tar.gz

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

Other differences:
------------------
++++++ ghc-machines-directory.spec ++++++
--- /var/tmp/diff_new_pack.QpdEg8/_old  2017-07-23 12:14:40.825366900 +0200
+++ /var/tmp/diff_new_pack.QpdEg8/_new  2017-07-23 12:14:40.829366335 +0200
@@ -18,7 +18,7 @@
 
 %global pkg_name machines-directory
 Name:           ghc-%{pkg_name}
-Version:        0.2.0.10
+Version:        0.2.1.0
 Release:        0
 Summary:        Directory (system) utilities for the machines library
 License:        Apache-2.0

++++++ machines-directory-0.2.0.10.tar.gz -> machines-directory-0.2.1.0.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/machines-directory-0.2.0.10/machines-directory.cabal 
new/machines-directory-0.2.1.0/machines-directory.cabal
--- old/machines-directory-0.2.0.10/machines-directory.cabal    2017-01-19 
19:19:46.000000000 +0100
+++ new/machines-directory-0.2.1.0/machines-directory.cabal     2017-03-08 
22:53:55.000000000 +0100
@@ -1,5 +1,5 @@
 name:                machines-directory
-version:             0.2.0.10
+version:             0.2.1.0
 synopsis:            Directory (system) utilities for the machines library
 homepage:            http://github.com/aloiscochard/machines-directory
 license:             Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/machines-directory-0.2.0.10/src/System/Directory/Machine/Internal.hs 
new/machines-directory-0.2.1.0/src/System/Directory/Machine/Internal.hs
--- old/machines-directory-0.2.0.10/src/System/Directory/Machine/Internal.hs    
2016-09-08 04:59:43.000000000 +0200
+++ new/machines-directory-0.2.1.0/src/System/Directory/Machine/Internal.hs     
2017-03-08 22:53:55.000000000 +0100
@@ -1,13 +1,6 @@
 module System.Directory.Machine.Internal where
 
-import Data.Machine
-
--- TODO Contribute to machines?
-joined :: Process [a] a
-joined = f [] where
-  f []      = MachineT . return $ Await (\xs -> f xs) Refl stopped
-  f (x:xs)  = MachineT . return $ Yield x $ f xs
-
+-- | Predicate to filter out relative paths: @"."@ and @".."@.
 isDirectoryContentsValid :: FilePath -> Bool
 isDirectoryContentsValid x = (x /= "." && x /= "..")
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/machines-directory-0.2.0.10/src/System/Directory/Machine.hs 
new/machines-directory-0.2.1.0/src/System/Directory/Machine.hs
--- old/machines-directory-0.2.0.10/src/System/Directory/Machine.hs     
2016-09-08 04:59:43.000000000 +0200
+++ new/machines-directory-0.2.1.0/src/System/Directory/Machine.hs      
2017-03-08 22:53:55.000000000 +0100
@@ -13,14 +13,29 @@
 
 import System.Directory.Machine.Internal
 
+-- | Recursively (breadth-first) walk thru the directory structure.
+--
+-- >>> runT (files <~ directoryWalk <~ source ["."])
+-- ["./.gitignore",...
 directoryWalk :: ProcessT IO FilePath FilePath
-directoryWalk = MachineT . return $ Await (\root -> f [root] []) Refl stopped 
where
-  f []    []      = directoryWalk
-  f xs    (y:ys)  = MachineT . return $ Yield y $ f xs ys
+directoryWalk = directoryWalk' (const True)
+
+-- | A variant of 'directoryWalk' with a predicate whether to descend
+-- into particular directory.
+--
+-- @
+-- directoryWalk' (not . isSuffixOf ".git")
+-- @
+--
+-- @since 0.2.1.0
+directoryWalk' :: (FilePath -> Bool) -> ProcessT IO FilePath FilePath
+directoryWalk' p = MachineT . return $ Await (\root -> f [root] []) Refl 
stopped where
+  f []     []      = directoryWalk
+  f xs     (y:ys)  = MachineT . return $ Yield y $ f xs ys
   f (x:xs) []      = MachineT $ do
     ys <- getDirectoryContents x
     let contents = (x </>) <$> (filter isDirectoryContentsValid $ ys)
-    dirs <- filterM doesDirectoryExist contents
+    dirs <- filterM doesDirectoryExist (filter p contents)
     runMachineT $ f (dirs ++ xs) contents
 
 directoryContents :: ProcessT IO FilePath [FilePath]


Reply via email to