Skip to content

Commit 410c2b2

Browse files
committed
Drop support for GHC < 8.10
1 parent deabcf2 commit 410c2b2

4 files changed

Lines changed: 11 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
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).

resource-pool.cabal

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff 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

src/Data/Pool/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Control.Monad
1313
import Data.Either
1414
import Data.Hashable (hash)
1515
import Data.IORef
16-
import qualified Data.List as L
16+
import Data.List qualified as L
1717
import Data.Primitive.SmallArray
1818
import GHC.Clock (getMonotonicTime)
1919
import GHC.Conc (unsafeIOToSTM)

src/Data/Pool/Introspection.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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.
4545
data 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.
5353
withResource :: Pool a -> (Resource a -> IO r) -> IO r

0 commit comments

Comments
 (0)