Skip to content

Commit 1bf0e68

Browse files
committed
Preliminary ghc 9.14 support
Currently using ghc-9.14.0.20251128 (-rc3).
1 parent d47e698 commit 1bf0e68

File tree

22 files changed

+392
-30
lines changed

22 files changed

+392
-30
lines changed

cabal.project

Lines changed: 140 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,144 @@ benchmarks: true
9191
-- The only sensible test display option
9292
test-show-details: streaming
9393

94-
if impl(ghc >=9.12)
94+
allow-newer:
95+
-- https://github.com/phadej/vec/issues/121
96+
, ral:QuickCheck
97+
, fin:QuickCheck
98+
, bin:QuickCheck
99+
100+
if impl(ghc >=9.14)
101+
source-repository-package
102+
type: git
103+
-- https://github.com/snowleopard/alga/issues/322
104+
location: https://github.com/snowleopard/alga/
105+
tag: d4e43fb42db05413459fb2df493361d5a666588a
106+
107+
source-repository-package
108+
type: git
109+
location: https://github.com/IntersectMBO/plutus
110+
tag: c65a4fa1c0985ee9411554318163b11194cc7663
111+
subdir:
112+
plutus-core
113+
plutus-tx
114+
plutus-ledger-api
115+
116+
if impl (ghc >= 9.14)
117+
constraints:
118+
, containers > 0.7
119+
, foldl >= 1.4.18
120+
, microlens ^>= 0.4
121+
, microlens-th ^>= 0.4
122+
123+
-- cabal-allow-newer
124+
if impl (ghc >= 9.14)
95125
allow-newer:
96-
-- Unique: https://github.com/kapralVV/Unique/issues/11
97-
, Unique:hashable
126+
, OneTuple:base
127+
, aeson:base
128+
, aeson:bytestring
129+
, aeson:containers
130+
, aeson:template-haskell
131+
, aeson:time
132+
, async:base
133+
, base64-bytestring-type:QuickCheck
134+
, base64-bytestring-type:base
135+
, base64-bytestring-type:http-api-data
136+
, bin:base
137+
, binary-orphans:base
138+
, boring:base
139+
, canonical-json:containers
140+
, cborg:base
141+
, cborg:containers
142+
, concurrent-output:process
143+
, config-ini:containers
144+
, config-ini:megaparsec
145+
, constraints:boring
146+
, constraints-extras:base
147+
, constraints-extras:template-haskell
148+
, containers:base
149+
, containers:template-haskell
150+
, dec:base
151+
, dependent-map:constraints-extras
152+
, dependent-map:containers
153+
, deriving-compat:containers
154+
, deriving-compat:template-haskell
155+
, dictionary-sharing:containers
156+
, directory:time
157+
, fin:base
158+
, fin:universe-base
159+
, foldable1-classes-compat:base
160+
, foldl:containers
161+
, free:base
162+
, free:containers
163+
, free:mtl
164+
, free:template-haskell
165+
, http-api-data:base
166+
, http-api-data:containers
167+
, indexed-traversable:base
168+
, indexed-traversable:containers
169+
, indexed-traversable-instances:base
170+
, ledger-state:persistent
171+
, lens:containers
172+
, lens:template-haskell
173+
, microlens-th:containers
174+
, microlens-th:template-haskell
175+
, microstache:aeson
176+
, microstache:base
177+
, microstache:containers
178+
, monoidal-containers:base
179+
, monoidal-containers:containers
180+
, nonempty-vector:base
181+
, optics-core:containers
182+
, ordered-containers:containers
183+
, parsec:mtl
184+
, persistent:template-haskell
185+
, persistent-sqlite:persistent
186+
, process:base
187+
, process:directory
188+
, quickcheck-instances:base
189+
, quickcheck-instances:containers
190+
, quickcheck-instances:time-compat
191+
, ral:base
192+
, recursion-schemes:containers
193+
, recursion-schemes:free
194+
, recursion-schemes:template-haskell
195+
, semialign:base
196+
, semialign:containers
197+
, semialign:indexed-traversable
198+
, semialign:indexed-traversable-instances
199+
, serialise:base
200+
, serialise:containers
201+
, serialise:these
202+
, serialise:time
203+
, singletons:base
204+
, singletons-th:base
205+
, singletons-th:mtl
206+
, singletons-th:singletons
207+
, singletons-th:template-haskell
208+
, singletons-th:th-desugar
209+
, singletons-th:th-orphans
210+
, size-based:template-haskell
211+
, some:base
212+
, text:bytestring
213+
, text:template-haskell
214+
, th-desugar:template-haskell
215+
, th-expand-syns:base
216+
, th-expand-syns:containers
217+
, th-expand-syns:template-haskell
218+
, th-orphans:template-haskell
219+
, these:base
220+
, time-compat:base
221+
, transformers:base
222+
, tree-diff:QuickCheck
223+
, tree-diff:aeson
224+
, tree-diff:base
225+
, tree-diff:containers
226+
, tree-diff:semialign
227+
, tree-diff:time
228+
, tree-diff:uuid-types
229+
, universe-base:base
230+
, universe-base:containers
231+
, uuid-types:template-haskell
232+
, validation-selective:base
233+
, vector-th-unbox:base
234+
, vector-th-unbox:template-haskell

eras/allegra/impl/cardano-ledger-allegra.cabal

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ library
6565
-Wpartial-fields
6666
-Wunused-packages
6767

68+
-- In ghc-9.14 the `pattern` namespace specifier is deprecated.
69+
if impl(ghc >=9.14)
70+
ghc-options:
71+
-Wno-pattern-namespace-specifier
72+
6873
build-depends:
6974
aeson,
7075
base >=4.18 && <5,
@@ -148,10 +153,20 @@ library testlib
148153
-Wcompat
149154
-Wincomplete-record-updates
150155
-Wincomplete-uni-patterns
151-
-Wredundant-constraints
152156
-Wpartial-fields
153157
-Wunused-packages
154158

159+
-- ghc-9.14 gives redundant constraint warnings on some constraints
160+
-- that are needed for earlier compilers.
161+
if impl(ghc <9.14)
162+
ghc-options:
163+
-Wredundant-constraints
164+
165+
-- In ghc-9.14 the `pattern` namespace specifier is deprecated.
166+
if impl(ghc >=9.14)
167+
ghc-options:
168+
-Wno-pattern-namespace-specifier
169+
155170
build-depends:
156171
QuickCheck,
157172
base,

eras/alonzo/impl/cardano-ledger-alonzo.cabal

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,19 @@ library
7373
-Wincomplete-record-updates
7474
-Wincomplete-uni-patterns
7575
-Wpartial-fields
76-
-Wredundant-constraints
7776
-Wunused-packages
7877

78+
-- ghc-9.14 gives redundant constraint warnings on some constraints
79+
-- that are needed for earlier compilers.
80+
if impl(ghc <9.14)
81+
ghc-options:
82+
-Wredundant-constraints
83+
84+
-- In ghc-9.14 the `pattern` namespace specifier is deprecated.
85+
if impl(ghc >=9.14)
86+
ghc-options:
87+
-Wno-pattern-namespace-specifier
88+
7989
build-depends:
8090
FailT,
8191
aeson >=2.2,
@@ -180,9 +190,19 @@ library testlib
180190
-Wincomplete-record-updates
181191
-Wincomplete-uni-patterns
182192
-Wpartial-fields
183-
-Wredundant-constraints
184193
-Wunused-packages
185194

195+
-- ghc-9.14 gives redundant constraint warnings on some constraints
196+
-- that are needed for earlier compilers.
197+
if impl(ghc <9.14)
198+
ghc-options:
199+
-Wredundant-constraints
200+
201+
-- In ghc-9.14 the `pattern` namespace specifier is deprecated.
202+
if impl(ghc >=9.14)
203+
ghc-options:
204+
-Wno-pattern-namespace-specifier
205+
186206
build-depends:
187207
HUnit,
188208
base,

eras/alonzo/test-suite/cardano-ledger-alonzo-test.cabal

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ library
4040
-Wredundant-constraints
4141
-Wunused-packages
4242

43+
-- In ghc-9.14 the `pattern` namespace specifier is deprecated.
44+
if impl(ghc >=9.14)
45+
ghc-options:
46+
-Wno-pattern-namespace-specifier
47+
4348
build-depends:
4449
QuickCheck,
4550
base >=4.18 && <5,

eras/babbage/impl/cardano-ledger-babbage.cabal

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,19 @@ library
7272
-Wincomplete-record-updates
7373
-Wincomplete-uni-patterns
7474
-Wpartial-fields
75-
-Wredundant-constraints
7675
-Wunused-packages
7776

77+
-- ghc-9.14 gives redundant constraint warnings on some constraints
78+
-- that are needed for earlier compilers.
79+
if impl(ghc <9.14)
80+
ghc-options:
81+
-Wredundant-constraints
82+
83+
-- In ghc-9.14 the `pattern` namespace specifier is deprecated.
84+
if impl(ghc >=9.14)
85+
ghc-options:
86+
-Wno-pattern-namespace-specifier
87+
7888
build-depends:
7989
aeson >=2.2,
8090
base >=4.18 && <5,
@@ -168,9 +178,19 @@ library testlib
168178
-Wincomplete-record-updates
169179
-Wincomplete-uni-patterns
170180
-Wpartial-fields
171-
-Wredundant-constraints
172181
-Wunused-packages
173182

183+
-- ghc-9.14 gives redundant constraint warnings on some constraints
184+
-- that are needed for earlier compilers.
185+
if impl(ghc <9.14)
186+
ghc-options:
187+
-Wredundant-constraints
188+
189+
-- In ghc-9.14 the `pattern` namespace specifier is deprecated.
190+
if impl(ghc >=9.14)
191+
ghc-options:
192+
-Wno-pattern-namespace-specifier
193+
174194
build-depends:
175195
QuickCheck,
176196
base,

eras/conway/impl/cardano-ledger-conway.cabal

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,19 @@ library
8888
-Wincomplete-record-updates
8989
-Wincomplete-uni-patterns
9090
-Wpartial-fields
91-
-Wredundant-constraints
9291
-Wunused-packages
9392

93+
-- ghc-9.14 gives redundant constraint warnings on some constraints
94+
-- that are needed for earlier compilers.
95+
if impl(ghc <9.14)
96+
ghc-options:
97+
-Wredundant-constraints
98+
99+
-- In ghc-9.14 the `pattern` namespace specifier is deprecated.
100+
if impl(ghc >=9.14)
101+
ghc-options:
102+
-Wno-pattern-namespace-specifier
103+
94104
build-depends:
95105
aeson >=2.2,
96106
base >=4.18 && <5,
@@ -212,9 +222,19 @@ library testlib
212222
-Wincomplete-record-updates
213223
-Wincomplete-uni-patterns
214224
-Wpartial-fields
215-
-Wredundant-constraints
216225
-Wunused-packages
217226

227+
-- ghc-9.14 gives redundant constraint warnings on some constraints
228+
-- that are needed for earlier compilers.
229+
if impl(ghc <9.14)
230+
ghc-options:
231+
-Wredundant-constraints
232+
233+
-- In ghc-9.14 the `pattern` namespace specifier is deprecated.
234+
if impl(ghc >=9.14)
235+
ghc-options:
236+
-Wno-pattern-namespace-specifier
237+
218238
build-depends:
219239
FailT,
220240
ImpSpec,

eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Proposals.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -716,11 +716,11 @@ toPTree (ChildParent childParent) root (PGraph fullGraph) = do
716716
childToTree parent child (!graph, !acc) =
717717
case Map.lookup child graph of
718718
Nothing -> Left $ "Cannot find the node: " ++ show child
719-
Just edges -> do
720-
unless (peParent edges == parent) $
719+
Just es -> do
720+
unless (peParent es == parent) $
721721
Left $
722722
"Incorrect parent: "
723-
++ show (peParent edges)
723+
++ show (peParent es)
724724
++ " listed for the node: "
725725
++ show child
726726
case Map.lookup child childParent of
@@ -738,7 +738,7 @@ toPTree (ChildParent childParent) root (PGraph fullGraph) = do
738738
(graph', !subTree) <-
739739
-- Deleting the child from the graph ensures that every node except the root
740740
-- appears exactly once in the graph.
741-
nodeToTree (SJust child) (peChildren edges) (Map.delete child graph)
741+
nodeToTree (SJust child) (peChildren es) (Map.delete child graph)
742742
pure (graph', subTree : acc)
743743

744744
-- | Verify invariant after addition of GovActionState to Proposals. Will print the state

eras/dijkstra/impl/cardano-ledger-dijkstra.cabal

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,19 @@ library
8787
-Wincomplete-record-updates
8888
-Wincomplete-uni-patterns
8989
-Wpartial-fields
90-
-Wredundant-constraints
9190
-Wunused-packages
9291

92+
-- ghc-9.14 gives redundant constraint warnings on some constraints
93+
-- that are needed for earlier compilers.
94+
if impl(ghc <9.14)
95+
ghc-options:
96+
-Wredundant-constraints
97+
98+
-- In ghc-9.14 the `pattern` namespace specifier is deprecated.
99+
if impl(ghc >=9.14)
100+
ghc-options:
101+
-Wno-pattern-namespace-specifier
102+
93103
build-depends:
94104
FailT,
95105
aeson,
@@ -147,9 +157,19 @@ library testlib
147157
-Wincomplete-record-updates
148158
-Wincomplete-uni-patterns
149159
-Wpartial-fields
150-
-Wredundant-constraints
151160
-Wunused-packages
152161

162+
-- ghc-9.14 gives redundant constraint warnings on some constraints
163+
-- that are needed for earlier compilers.
164+
if impl(ghc <9.14)
165+
ghc-options:
166+
-Wredundant-constraints
167+
168+
-- In ghc-9.14 the `pattern` namespace specifier is deprecated.
169+
if impl(ghc >=9.14)
170+
ghc-options:
171+
-Wno-pattern-namespace-specifier
172+
153173
build-depends:
154174
base,
155175
bytestring,

0 commit comments

Comments
 (0)