Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-network-control for openSUSE:Factory checked in at 2025-05-22 16:57:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-network-control (Old) and /work/SRC/openSUSE:Factory/.ghc-network-control.new.2732 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-network-control" Thu May 22 16:57:10 2025 rev:5 rq:1279245 version:0.1.7 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-network-control/ghc-network-control.changes 2025-04-07 19:15:11.324379511 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-network-control.new.2732/ghc-network-control.changes 2025-05-22 16:57:49.376341437 +0200 @@ -1,0 +2,8 @@ +Sun May 18 23:42:14 UTC 2025 - Peter Simons <psim...@suse.com> + +- Update network-control to version 0.1.7. + ## 0.1.7 + + * Implementing setLRUCapacity. + +------------------------------------------------------------------- Old: ---- network-control-0.1.6.tar.gz New: ---- network-control-0.1.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-network-control.spec ++++++ --- /var/tmp/diff_new_pack.0AAp9q/_old 2025-05-22 16:57:49.908363856 +0200 +++ /var/tmp/diff_new_pack.0AAp9q/_new 2025-05-22 16:57:49.908363856 +0200 @@ -20,7 +20,7 @@ %global pkgver %{pkg_name}-%{version} %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.1.6 +Version: 0.1.7 Release: 0 Summary: Library to control network protocols License: BSD-3-Clause ++++++ network-control-0.1.6.tar.gz -> network-control-0.1.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/network-control-0.1.6/Changelog.md new/network-control-0.1.7/Changelog.md --- old/network-control-0.1.6/Changelog.md 2001-09-09 03:46:40.000000000 +0200 +++ new/network-control-0.1.7/Changelog.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,9 @@ # Revision history for network-control +## 0.1.7 + +* Implementing setLRUCapacity. + ## 0.1.6 * Allowing size 0. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/network-control-0.1.6/Network/Control/LRUCache.hs new/network-control-0.1.7/Network/Control/LRUCache.hs --- old/network-control-0.1.6/Network/Control/LRUCache.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/network-control-0.1.7/Network/Control/LRUCache.hs 2001-09-09 03:46:40.000000000 +0200 @@ -14,6 +14,7 @@ newLRUCacheRef, cached, cached', + setLRUCapacity, -- * Internal empty', @@ -120,17 +121,16 @@ ---------------------------------------------------------------- +-- | Mutable LRUCache. newtype LRUCacheRef k v = LRUCacheRef (IORef (LRUCache k v)) +-- | Creating 'LRUCacheRef'. newLRUCacheRef :: Int -> IO (LRUCacheRef k v) newLRUCacheRef capacity = LRUCacheRef <$> newIORef (empty capacity) -cached' :: Ord k => LRUCacheRef k v -> k -> IO (Maybe v) -cached' (LRUCacheRef ref) k = do - atomicModifyIORef' ref $ \c -> case lookup' k c of - Nothing -> (c, Nothing) - Just (v, c') -> (c', Just v) - +-- | Looking up a target and adjusting the LRU cache. +-- If not found, a new value is inserted. +-- A pair of value and "found" is returned. cached :: Ord k => LRUCacheRef k v -> k -> IO v -> IO (v, Bool) cached (LRUCacheRef ref) k io = do lookupRes <- atomicModifyIORef' ref $ \c -> case lookup' k c of @@ -142,3 +142,15 @@ v <- io atomicModifyIORef' ref $ \c -> (insert k v c, ()) return (v, False) + +-- | Looking up a target and adjusting the LRU cache. +cached' :: Ord k => LRUCacheRef k v -> k -> IO (Maybe v) +cached' (LRUCacheRef ref) k = do + atomicModifyIORef' ref $ \c -> case lookup' k c of + Nothing -> (c, Nothing) + Just (v, c') -> (c', Just v) + +-- | Setting capacity of the LRU cache. +setLRUCapacity :: LRUCacheRef k v -> Int -> IO () +setLRUCapacity (LRUCacheRef ref) lim = atomicModifyIORef' ref $ \c -> + (c{lcLimit = lim}, ()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/network-control-0.1.6/network-control.cabal new/network-control-0.1.7/network-control.cabal --- old/network-control-0.1.6/network-control.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/network-control-0.1.7/network-control.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ cabal-version: 3.0 name: network-control -version: 0.1.6 +version: 0.1.7 license: BSD-3-Clause license-file: LICENSE maintainer: k...@iij.ad.jp