Skip to content

Commit 43c1fef

Browse files
authored
Make it build with ghc 9.12 (#1406)
# Description Make it build with ghc 9.12 Also note that: - New code should be properly tested (even if it does not add new features). - The fix for a regression should include a test that reproduces said regression.
2 parents 2503a39 + 57c653f commit 43c1fef

File tree

17 files changed

+61
-16
lines changed

17 files changed

+61
-16
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
strategy:
3939
fail-fast: false
4040
matrix:
41-
ghc: ["8.10.7", "9.6.6", "9.10.1"]
41+
ghc: ["8.10.7", "9.6.6", "9.10.1", "9.12"]
4242
variant: [default, no-thunks]
4343
test-set: [all, no-thunks-safe]
4444
exclude:

cabal.project

+24-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ repository cardano-haskell-packages
1414
-- update either of these.
1515
index-state:
1616
-- Bump this if you need newer packages from Hackage
17-
, hackage.haskell.org 2024-12-10T16:20:07Z
17+
, hackage.haskell.org 2025-02-27T18:46:10Z
1818
-- Bump this if you need newer packages from CHaP
19-
, cardano-haskell-packages 2025-02-04T06:43:15Z
19+
, cardano-haskell-packages 2025-02-28T01:28:51Z
2020

2121
packages:
2222
ouroboros-consensus
@@ -44,3 +44,25 @@ package ouroboros-network
4444
if(os(windows))
4545
constraints:
4646
bitvec -simd
47+
48+
if impl (ghc >= 9.12)
49+
allow-newer:
50+
-- https://github.com/phadej/vec/issues/118
51+
, bin:base
52+
, fin:base
53+
, ral:base
54+
55+
-- https://github.com/well-typed/cborg/pull/339
56+
, cborg:base
57+
, cborg:ghc-prim
58+
, serialise:base
59+
, serialise:ghc-prim
60+
61+
-- https://github.com/haskellari/tree-diff/issues/97
62+
, tree-diff:base
63+
64+
-- https://github.com/kapralVV/Unique/issues/11
65+
, Unique:hashable
66+
67+
-- https://github.com/fizruk/http-api-data/pull/146
68+
, http-api-data:base
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
### Non-Breaking
2+
3+
- Bump upper bound on `base` dependency.
4+

ouroboros-consensus-cardano/ouroboros-consensus-cardano.cabal

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ library
124124
Ouroboros.Consensus.Shelley.ShelleyHFC
125125

126126
build-depends:
127-
base >=4.14 && <4.21,
127+
base >=4.14 && <4.22,
128128
base-deriving-via,
129129
bytestring >=0.10 && <0.13,
130130
cardano-binary,
@@ -188,7 +188,7 @@ library unstable-byronspec
188188
Ouroboros.Consensus.ByronSpec.Ledger.Rules
189189

190190
build-depends:
191-
base >=4.14 && <4.21,
191+
base >=4.14 && <4.22,
192192
bimap >=0.4 && <0.6,
193193
byron-spec-chain,
194194
byron-spec-ledger,
@@ -513,7 +513,7 @@ library unstable-cardano-tools
513513

514514
build-depends:
515515
aeson,
516-
base >=4.14 && <4.21,
516+
base >=4.14 && <4.22,
517517
base16-bytestring >=1.0,
518518
bytestring >=0.10 && <0.13,
519519
cardano-crypto,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
### Non-Breaking
2+
3+
- Bump upper bound on `base` dependency.
4+

ouroboros-consensus-diffusion/ouroboros-consensus-diffusion.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ library
7777
Ouroboros.Consensus.Node.Run,
7878

7979
build-depends:
80-
base >=4.14 && <4.21,
80+
base >=4.14 && <4.22,
8181
bytestring >=0.10 && <0.13,
8282
cardano-slotting,
8383
cborg ^>=0.2.2,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
### Non-Breaking
2+
3+
- Bump upper bound on `base` dependency.
4+

ouroboros-consensus-protocol/ouroboros-consensus-protocol.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ library
6363
Ouroboros.Consensus.Protocol.TPraos
6464

6565
build-depends:
66-
base >=4.14 && <4.21,
66+
base >=4.14 && <4.22,
6767
bytestring,
6868
cardano-binary,
6969
cardano-crypto-class,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
### Non-Breaking
2+
3+
- Remove redundant derived Typeable instances.
4+
5+
- Bump upper bound on `base` dependency.
6+

ouroboros-consensus/ouroboros-consensus.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ library
270270
Ouroboros.Consensus.Util.Versioned
271271

272272
build-depends:
273-
base >=4.14 && <4.21,
273+
base >=4.14 && <4.22,
274274
base-deriving-via,
275275
base16-bytestring,
276276
bimap >=0.4 && <0.6,

ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/ChainDB/API.hs

-2
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,6 @@ data ChainDbFailure blk =
805805
--
806806
-- Thrown when we are not sure in which DB the block /should/ have been.
807807
| ChainDbMissingBlock (RealPoint blk)
808-
deriving (Typeable)
809808

810809
deriving instance StandardHash blk => Show (ChainDbFailure blk)
811810

@@ -849,7 +848,6 @@ data ChainDbError blk =
849848
-- * The bounds don't make sense, e.g., the lower bound starts after the
850849
-- upper bound, or the lower bound starts from genesis, /inclusive/.
851850
| InvalidIteratorRange (StreamFrom blk) (StreamTo blk)
852-
deriving (Typeable)
853851

854852
deriving instance (Typeable blk, StandardHash blk) => Show (ChainDbError blk)
855853

ouroboros-consensus/src/unstable-consensus-testlib/Test/Util/TestBlock.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ import Test.Util.Orphans.ToExpr ()
183183
newtype TestHash = UnsafeTestHash {
184184
unTestHash :: NonEmpty Word64
185185
}
186-
deriving stock (Generic, Typeable)
186+
deriving stock (Generic)
187187
deriving newtype (Eq, Ord, Serialise, ToExpr)
188188
deriving anyclass (NoThunks)
189189

ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/TestBlock.hs

+1-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ import qualified Data.List.NonEmpty as NE
7878
import qualified Data.Map.Strict as Map
7979
import Data.Maybe (maybeToList)
8080
import Data.TreeDiff
81-
import Data.Typeable (Typeable)
8281
import Data.Word
8382
import GHC.Generics (Generic)
8483
import GHC.Stack (HasCallStack)
@@ -127,7 +126,7 @@ data TestBlock = TestBlock {
127126
testHeader :: !TestHeader
128127
, testBody :: !TestBody
129128
}
130-
deriving stock (Show, Eq, Generic, Typeable)
129+
deriving stock (Show, Eq, Generic)
131130
deriving anyclass (NoThunks, Serialise)
132131

133132
-- | Hash of a 'TestHeader'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
### Non-Breaking
2+
3+
- Bump upper bound on `base` dependency.
4+

sop-extras/sop-extras.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ library
4747
Data.SOP.Telescope
4848

4949
build-depends:
50-
base >=4.14 && <4.21,
50+
base >=4.14 && <4.22,
5151
constraints ^>=0.14,
5252
nothunks ^>=0.2,
5353
sop-core ^>=0.5,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
### Non-Breaking
2+
3+
- Bump upper bound on `base` dependency.
4+

strict-sop-core/strict-sop-core.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ library
3737
Data.SOP.Strict.NS
3838

3939
build-depends:
40-
base >=4.14 && <4.21,
40+
base >=4.14 && <4.22,
4141
nothunks ^>=0.2,
4242
sop-core ^>=0.5,
4343

0 commit comments

Comments
 (0)