File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# resource-pool-0.5.0.0 (2025-??-??)
2+ * Drop support for GHC < 8.10.
23* Use STM based lockless implementation as it results in much better throughput
34 in a multi-threaded environment when number of stripes is not equal to the
45 number of capabilities (in particular with a single stripe).
Original file line number Diff line number Diff line change @@ -32,17 +32,22 @@ library
3232 Data.Pool.Internal
3333 Data.Pool.Introspection
3434
35- build-depends : base >= 4.11 && < 5
35+ build-depends : base >= 4.14 && < 5
3636 , hashable >= 1.1.0.0
3737 , primitive >= 0.7
3838 , stm
3939 , time
4040
41- ghc-options : -Wall -Wcompat
41+ ghc-options : -Wall
42+ -Wcompat
43+ -Wmissing-deriving-strategies
44+ -Werror=prepositive-qualified-module
4245
4346 default-language : Haskell2010
4447
4548 default-extensions : DeriveGeneric
49+ , DerivingStrategies
50+ , ImportQualifiedPost
4651 , LambdaCase
4752 , RankNTypes
4853 , ScopedTypeVariables
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import Control.Monad
1313import Data.Either
1414import Data.Hashable (hash )
1515import Data.IORef
16- import qualified Data.List as L
16+ import Data.List qualified as L
1717import Data.Primitive.SmallArray
1818import GHC.Clock (getMonotonicTime )
1919import GHC.Conc (unsafeIOToSTM )
Original file line number Diff line number Diff line change @@ -39,15 +39,15 @@ data Resource a = Resource
3939 , acquisitionTime :: ! Double
4040 , creationTime :: ! (Maybe Double )
4141 }
42- deriving (Eq , Show , Generic )
42+ deriving stock (Eq , Show , Generic )
4343
4444-- | Describes how a resource was acquired from the pool.
4545data Acquisition
4646 = -- | A resource was taken from the pool immediately.
4747 Immediate
4848 | -- | The thread had to wait until a resource was released.
4949 Delayed
50- deriving (Eq , Show , Generic )
50+ deriving stock (Eq , Show , Generic )
5151
5252-- | 'Data.Pool.withResource' with introspection capabilities.
5353withResource :: Pool a -> (Resource a -> IO r ) -> IO r
You can’t perform that action at this time.
0 commit comments