Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-fgl for openSUSE:Factory checked in at 2023-01-28 18:44:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-fgl (Old) and /work/SRC/openSUSE:Factory/.ghc-fgl.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-fgl" Sat Jan 28 18:44:29 2023 rev:6 rq:1061630 version:5.8.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-fgl/ghc-fgl.changes 2022-10-13 15:41:59.638720213 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-fgl.new.32243/ghc-fgl.changes 2023-01-28 18:51:53.176854106 +0100 @@ -1,0 +2,12 @@ +Thu Jan 26 21:28:27 UTC 2023 - Peter Simons <psim...@suse.com> + +- Update fgl to version 5.8.1.0. + 5.8.1.0 + ------- + + * Data.Graph.Inductive.PatriciaTree.Gr and + Data.Graph.Inductive.Tree.Gr now have Functor instances. + + * 'Gr a' is now an instance of Functor. + +------------------------------------------------------------------- Old: ---- fgl-5.8.0.0.tar.gz New: ---- fgl-5.8.1.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-fgl.spec ++++++ --- /var/tmp/diff_new_pack.EcriXR/_old 2023-01-28 18:51:53.528856114 +0100 +++ /var/tmp/diff_new_pack.EcriXR/_new 2023-01-28 18:51:53.528856114 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-fgl # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # 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 fgl %bcond_with tests Name: ghc-%{pkg_name} -Version: 5.8.0.0 +Version: 5.8.1.0 Release: 0 Summary: Martin Erwig's Functional Graph Library License: BSD-3-Clause ++++++ fgl-5.8.0.0.tar.gz -> fgl-5.8.1.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.8.0.0/ChangeLog new/fgl-5.8.1.0/ChangeLog --- old/fgl-5.8.0.0/ChangeLog 2001-09-09 03:46:40.000000000 +0200 +++ new/fgl-5.8.1.0/ChangeLog 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,11 @@ +5.8.1.0 +------- + +* Data.Graph.Inductive.PatriciaTree.Gr and + Data.Graph.Inductive.Tree.Gr now have Functor instances. + +* 'Gr a' is now an instance of Functor. + 5.8.0.0 ------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.8.0.0/Data/Graph/Inductive/PatriciaTree.hs new/fgl-5.8.1.0/Data/Graph/Inductive/PatriciaTree.hs --- old/fgl-5.8.0.0/Data/Graph/Inductive/PatriciaTree.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/fgl-5.8.1.0/Data/Graph/Inductive/PatriciaTree.hs 2001-09-09 03:46:40.000000000 +0200 @@ -134,6 +134,9 @@ rnf (Gr g) = rnf g #endif +instance Functor (Gr a) where + fmap = fastEMap + #if MIN_VERSION_base (4,8,0) instance Bifunctor Gr where bimap = fastNEMap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.8.0.0/Data/Graph/Inductive/Query/Dominators.hs new/fgl-5.8.1.0/Data/Graph/Inductive/Query/Dominators.hs --- old/fgl-5.8.0.0/Data/Graph/Inductive/Query/Dominators.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/fgl-5.8.1.0/Data/Graph/Inductive/Query/Dominators.hs 2001-09-09 03:46:40.000000000 +0200 @@ -51,6 +51,7 @@ idomWork :: (Graph gr) => gr a b -> Node -> (IDom, ToNode, FromNode) idomWork g root = let + nds = reachable root g -- use depth first tree from root do build the first approximation trees@(~[tree]) = dff [root] g -- relabel the tree so that paths from the root have increasing nodes @@ -58,7 +59,7 @@ -- the approximation iDom0 just maps each node to its parent iD0 = array (1, s-1) (tail $ treeEdges (-1) ntree) -- fromNode translates graph nodes to relabeled (internal) nodes - fromNode = I.unionWith const (I.fromList (zip (T.flatten tree) (T.flatten ntree))) (I.fromList (zip (nodes g) (repeat (-1)))) + fromNode = I.unionWith const (I.fromList (zip (T.flatten tree) (T.flatten ntree))) (I.fromList (zip nds (repeat (-1)))) -- toNode translates internal nodes to graph nodes toNode = array (0, s-1) (zip (T.flatten ntree) (T.flatten tree)) preds = array (1, s-1) [(i, filter (/= -1) (map (fromNode I.!) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.8.0.0/Data/Graph/Inductive/Query/TransClos.hs new/fgl-5.8.1.0/Data/Graph/Inductive/Query/TransClos.hs --- old/fgl-5.8.0.0/Data/Graph/Inductive/Query/TransClos.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/fgl-5.8.1.0/Data/Graph/Inductive/Query/TransClos.hs 2001-09-09 03:46:40.000000000 +0200 @@ -34,7 +34,8 @@ G* = (V,Er union E) where Er = {(i,i): i in V} -} rc :: (DynGraph gr) => gr a b -> gr a () -rc g = newEdges `insEdges` insNodes ln empty +rc g = (newEdges ++ oldEdges) `insEdges` insNodes ln empty where ln = labNodes g newEdges = [ (u, u, ()) | (u, _) <- ln ] + oldEdges = [ (u, v, ()) | (u, v, _) <- labEdges g ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.8.0.0/Data/Graph/Inductive/Tree.hs new/fgl-5.8.1.0/Data/Graph/Inductive/Tree.hs --- old/fgl-5.8.0.0/Data/Graph/Inductive/Tree.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/fgl-5.8.1.0/Data/Graph/Inductive/Tree.hs 2001-09-09 03:46:40.000000000 +0200 @@ -135,6 +135,9 @@ rnf (Gr g) = rnf g #endif +instance Functor (Gr a) where + fmap = emap + #if MIN_VERSION_base (4,8,0) instance Bifunctor Gr where bimap = nemap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.8.0.0/fgl.cabal new/fgl-5.8.1.0/fgl.cabal --- old/fgl-5.8.0.0/fgl.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/fgl-5.8.1.0/fgl.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,9 +1,9 @@ name: fgl -version: 5.8.0.0 +version: 5.8.1.0 license: BSD3 license-file: LICENSE author: Martin Erwig, Ivan Lazar Miljenovic -maintainer: ivan.miljeno...@gmail.com +maintainer: at...@sigkill.dk category: Data Structures, Graphs synopsis: Martin Erwig's Functional Graph Library diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fgl-5.8.0.0/test/Data/Graph/Inductive/Query/Properties.hs new/fgl-5.8.1.0/test/Data/Graph/Inductive/Query/Properties.hs --- old/fgl-5.8.0.0/test/Data/Graph/Inductive/Query/Properties.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/fgl-5.8.1.0/test/Data/Graph/Inductive/Query/Properties.hs 2001-09-09 03:46:40.000000000 +0200 @@ -133,14 +133,22 @@ -- Dominators test_dom :: Spec -test_dom = it "dom" $ - sortIt (dom domGraph 1) `shouldMatchList` [ (1, [1]) - , (2, [1,2]) - , (3, [1,2,3]) - , (4, [1,2,4]) - , (5, [1,2,5]) - , (6, [1,2,6]) - ] +test_dom = describe "dom" $ do + it "regular dom" $ + sortIt (dom domGraph 1) `shouldMatchList` [ (1, [1]) + , (2, [1,2]) + , (3, [1,2,3]) + , (4, [1,2,4]) + , (5, [1,2,5]) + , (6, [1,2,6]) + ] + it "multiple components dom" $ + sortIt (dom domGraph1 1) `shouldMatchList` [ (1, [1]) + , (2, [1, 2]) + ] + it "directed reachable components dom" $ + sortIt (dom domGraph2 1) `shouldMatchList` [ (1, [1]) ] + where sortIt = map (second sort) @@ -160,6 +168,20 @@ , (5,2) ] +-- This graph has two components (independent subgraphs) +domGraph1 :: Gr () () +domGraph1 = mkUGraph [1..3] + [ (1,2) + ] + +-- This graph has no reachables from 1 (but 1 is reachable) +domGraph2 :: Gr () () +domGraph2 = mkUGraph [1..3] + [ (2,1) + , (2,2) + ] + + -- ----------------------------------------------------------------------------- -- GVD