Skip to content

Commit 72fb4af

Browse files
committed
Preliminary ghc 9.14 support
Currently using ghc-9.14.0.20251007.
1 parent 194dd11 commit 72fb4af

File tree

127 files changed

+1661
-96
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+1661
-96
lines changed

cabal.project

Lines changed: 216 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,220 @@ benchmarks: true
9292
-- The only sensible test display option
9393
test-show-details: streaming
9494

95-
if impl(ghc >=9.12)
95+
allow-newer:
96+
-- https://github.com/phadej/vec/issues/121
97+
, ral:QuickCheck
98+
, fin:QuickCheck
99+
, bin:QuickCheck
100+
101+
if impl(ghc >=9.14)
102+
source-repository-package
103+
type: git
104+
-- https://github.com/snowleopard/alga/issues/322
105+
location: https://github.com/snowleopard/alga/
106+
tag: d4e43fb42db05413459fb2df493361d5a666588a
107+
108+
source-repository-package
109+
type: git
110+
location: https://github.com/IntersectMBO/plutus
111+
tag: af84d283f9a64c8c7cc5d544602e555c5798cb8e
112+
subdir:
113+
plutus-core
114+
plutus-tx
115+
plutus-ledger-api
116+
117+
if impl (ghc >= 9.14)
118+
constraints:
119+
, containers > 0.7
120+
, foldl >= 1.4.18
121+
, nothunks ^>= 0.2
122+
, microlens ^>= 0.4
123+
, microlens-th < 0.4.3.18
124+
-- Newest version causes Arbitrary instance clashes in quickcheck-instances.
125+
, QuickCheck < 2.17.0.0
126+
127+
-- cabal-allow-newer
128+
if impl (ghc >= 9.14)
96129
allow-newer:
97-
-- Unique: https://github.com/kapralVV/Unique/issues/11
98-
, Unique:hashable
130+
, OneTuple:base
131+
, aeson:base
132+
, aeson:bytestring
133+
, aeson:containers
134+
, aeson:deepseq
135+
, aeson:ghc-prim
136+
, aeson:template-haskell
137+
, aeson:text-short
138+
, aeson:time
139+
, aeson:witherable
140+
, assoc:base
141+
, async:base
142+
, base:ghc-internal
143+
, base:ghc-prim
144+
, base64-bytestring-type:base
145+
, base64-bytestring-type:http-api-data
146+
, bifunctors:containers
147+
, bifunctors:template-haskell
148+
, bin:base
149+
, binary-orphans:base
150+
, boring:base
151+
, boring:tagged
152+
, brick:base
153+
, canonical-json:containers
154+
, capability:generic-lens
155+
, cborg:base
156+
, cborg:containers
157+
, concurrent-output:process
158+
, config-ini:containers
159+
, config-ini:megaparsec
160+
, constraints:boring
161+
, constraints:hashable
162+
, constraints-extras:base
163+
, constraints-extras:template-haskell
164+
, containers:base
165+
, containers:deepseq
166+
, containers:template-haskell
167+
, cuddle:foldable1-classes-compat
168+
, cuddle:megaparsec
169+
, data-default:containers
170+
, data-default-class:data-default
171+
, data-fix:base
172+
, dec:base
173+
, deepseq:base
174+
, deepseq:ghc-prim
175+
, dependent-map:constraints-extras
176+
, dependent-map:containers
177+
, deriving-compat:containers
178+
, deriving-compat:template-haskell
179+
, dictionary-sharing:containers
180+
, directory:base
181+
, directory:time
182+
, dom-lt:containers
183+
, filepath:bytestring
184+
, filepath:template-haskell
185+
, fin:base
186+
, fin:universe-base
187+
, foldable1-classes-compat:base
188+
, foldl:containers
189+
, free:containers
190+
, free:template-haskell
191+
, free:transformers
192+
, generic-lens:generic-lens-core
193+
, generically:base
194+
, ghc-heap:containers
195+
, ghc-heap:ghc-internal
196+
, hashable:base
197+
, hashable:bytestring
198+
, hashable:containers
199+
, hashable:ghc-bignum
200+
, hashable:ghc-prim
201+
, hedgehog:async
202+
, hedgehog:containers
203+
, hedgehog:template-haskell
204+
, hedgehog:time
205+
, hsc2hs:base
206+
, http-api-data:base
207+
, http-api-data:containers
208+
, indexed-traversable:base
209+
, indexed-traversable:containers
210+
, indexed-traversable-instances:base
211+
, integer-conversion:base
212+
, integer-logarithms:base
213+
, integer-logarithms:ghc-bignum
214+
, io-classes:base
215+
, io-classes:time
216+
, ledger-state:persistent
217+
, lens:containers
218+
, lens:parallel
219+
, lens:template-haskell
220+
, megaparsec:containers
221+
, microlens-th:containers
222+
, microlens-th:template-haskell
223+
, microstache:base
224+
, microstache:containers
225+
, monoidal-containers:base
226+
, monoidal-containers:containers
227+
, nonempty-vector:base
228+
, nothunks:containers
229+
, nothunks:time
230+
, nothunks:wherefrom-compat
231+
, optics-core:containers
232+
, ordered-containers:containers
233+
, parallel:base
234+
, persistent:template-haskell
235+
, persistent-sqlite:persistent
236+
, plutus-core:dependent-map
237+
, primitive:base
238+
, process:base
239+
, process:directory
240+
, quickcheck-instances:base
241+
, quickcheck-instances:containers
242+
, quickcheck-instances:data-fix
243+
, quickcheck-instances:time-compat
244+
, ral:base
245+
, recursion-schemes:containers
246+
, recursion-schemes:template-haskell
247+
, scientific:base
248+
, scientific:containers
249+
, scientific:template-haskell
250+
, semialign:base
251+
, semialign:containers
252+
, semialign:indexed-traversable
253+
, semialign:indexed-traversable-instances
254+
, semigroupoids:bifunctors
255+
, serialise:base
256+
, serialise:containers
257+
, serialise:ghc-prim
258+
, serialise:these
259+
, serialise:time
260+
, singletons:base
261+
, singletons-th:base
262+
, singletons-th:singletons
263+
, singletons-th:template-haskell
264+
, singletons-th:th-desugar
265+
, singletons-th:th-orphans
266+
, size-based:template-haskell
267+
, some:base
268+
, splitmix:base
269+
, tagged:template-haskell
270+
, tasty-hedgehog:base
271+
, text:bytestring
272+
, text-iso8601:time
273+
, text-short:base
274+
, text-short:ghc-prim
275+
, text-short:template-haskell
276+
, th-abstraction:containers
277+
, th-abstraction:template-haskell
278+
, th-compat:template-haskell
279+
, th-desugar:template-haskell
280+
, th-expand-syns:base
281+
, th-expand-syns:containers
282+
, th-expand-syns:template-haskell
283+
, th-lift:template-haskell
284+
, th-lift-instances:th-lift
285+
, th-orphans:template-haskell
286+
, these:assoc
287+
, these:base
288+
, time-compat:base
289+
, time-compat:time
290+
, transformers:base
291+
, tree-diff:aeson
292+
, tree-diff:base
293+
, tree-diff:containers
294+
, tree-diff:scientific
295+
, tree-diff:semialign
296+
, tree-diff:time
297+
, tree-diff:unordered-containers
298+
, universe-base:base
299+
, universe-base:containers
300+
, unordered-containers:base
301+
, unordered-containers:template-haskell
302+
, uuid-types:deepseq
303+
, uuid-types:template-haskell
304+
, validation-selective:base
305+
, vault:base
306+
, vault:containers
307+
, vector-th-unbox:base
308+
, vector-th-unbox:template-haskell
309+
, wherefrom-compat:base
310+
, wherefrom-compat:ghc-heap
311+
, witherable:containers

eras/allegra/impl/src/Cardano/Ledger/Allegra/Scripts.hs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,13 @@ module Cardano.Ledger.Allegra.Scripts (
4141
mkTimeExpireTimelock,
4242
getTimeExpireTimelock,
4343
Timelock (MkTimelock, TimelockConstr),
44+
#if __GLASGOW_HASKELL__ >= 914
45+
data RequireTimeExpire,
46+
data RequireTimeStart,
47+
#else
4448
pattern RequireTimeExpire,
4549
pattern RequireTimeStart,
50+
#endif
4651
TimelockRaw (..),
4752
inInterval,
4853
showTimelock,
@@ -92,10 +97,17 @@ import Cardano.Ledger.MemoBytes.Internal (mkMemoBytes)
9297
import Cardano.Ledger.Shelley.Scripts (
9398
ShelleyEraScript (..),
9499
nativeMultiSigTag,
100+
#if __GLASGOW_HASKELL__ >= 914
101+
data RequireAllOf,
102+
data RequireAnyOf,
103+
data RequireMOf,
104+
data RequireSignature,
105+
#else
95106
pattern RequireAllOf,
96107
pattern RequireAnyOf,
97108
pattern RequireMOf,
98109
pattern RequireSignature,
110+
#endif
99111
)
100112
import Cardano.Slotting.Slot (SlotNo (..))
101113
import Control.DeepSeq (NFData (..))

eras/allegra/impl/testlib/Test/Cardano/Ledger/Allegra/Arbitrary.hs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE DataKinds #-}
23
{-# LANGUAGE DerivingStrategies #-}
34
{-# LANGUAGE FlexibleContexts #-}
@@ -25,16 +26,29 @@ import Cardano.Ledger.Allegra.Scripts (
2526
AllegraEraScript (..),
2627
Timelock (..),
2728
ValidityInterval (..),
29+
#if __GLASGOW_HASKELL__ >= 914
30+
data RequireTimeExpire,
31+
data RequireTimeStart,
32+
#else
2833
pattern RequireTimeExpire,
2934
pattern RequireTimeStart,
35+
#endif
3036
)
3137
import Cardano.Ledger.Allegra.Transition
3238
import Cardano.Ledger.Allegra.TxAuxData (AllegraTxAuxData (..))
39+
#if __GLASGOW_HASKELL__ >= 914
40+
import Cardano.Ledger.Allegra.TxBody (data AllegraTxBody)
41+
#else
3342
import Cardano.Ledger.Allegra.TxBody (pattern AllegraTxBody)
43+
#endif
3444
import Cardano.Ledger.Core
3545
import Cardano.Ledger.Shelley.API (ShelleyTxAuxData (ShelleyTxAuxData))
3646
import Cardano.Ledger.Shelley.Scripts (
47+
#if __GLASGOW_HASKELL__ >= 914
48+
data RequireSignature,
49+
#else
3750
pattern RequireSignature,
51+
#endif
3852
)
3953
import Data.Sequence.Strict (StrictSeq, fromList)
4054
import Generic.Random (genericArbitraryU)
@@ -69,7 +83,11 @@ instance
6983
forall era.
7084
( AllegraEraScript era
7185
, Arbitrary (NativeScript era)
86+
#if __GLASGOW_HASKELL__ < 914
87+
-- These constraints are REQUIRED for ghc < 9.14 but REDUNDANT for ghc >= 9.14
88+
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/26381#note_637863
7289
, Arbitrary (Script era)
90+
#endif
7391
, Era era
7492
) =>
7593
Arbitrary (AllegraTxAuxData era)

eras/allegra/impl/testlib/Test/Cardano/Ledger/Allegra/ImpTest.hs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE DataKinds #-}
23
{-# LANGUAGE FlexibleContexts #-}
34
{-# LANGUAGE LambdaCase #-}
@@ -18,14 +19,26 @@ import Cardano.Ledger.Allegra.Scripts (
1819
AllegraEraScript,
1920
Timelock,
2021
evalTimelock,
22+
#if __GLASGOW_HASKELL__ >= 914
23+
data RequireTimeExpire,
24+
data RequireTimeStart,
25+
#else
2126
pattern RequireTimeExpire,
2227
pattern RequireTimeStart,
28+
#endif
2329
)
2430
import Cardano.Ledger.Shelley.Scripts (
31+
#if __GLASGOW_HASKELL__ >= 914
32+
data RequireAllOf,
33+
data RequireAnyOf,
34+
data RequireMOf,
35+
data RequireSignature,
36+
#else
2537
pattern RequireAllOf,
2638
pattern RequireAnyOf,
2739
pattern RequireMOf,
2840
pattern RequireSignature,
41+
#endif
2942
)
3043
import qualified Data.Map.Strict as Map
3144
import qualified Data.Set as Set

eras/alonzo/impl/src/Cardano/Ledger/Alonzo.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE DataKinds #-}
23
{-# LANGUAGE FlexibleContexts #-}
34
{-# LANGUAGE FlexibleInstances #-}
45
{-# LANGUAGE PatternSynonyms #-}
56
{-# LANGUAGE ScopedTypeVariables #-}
67
{-# LANGUAGE TypeApplications #-}
8+
{-# LANGUAGE TypeFamilies #-}
79
{-# LANGUAGE UndecidableInstances #-}
810
{-# OPTIONS_GHC -Wno-orphans #-}
911

@@ -12,7 +14,11 @@ module Cardano.Ledger.Alonzo (
1214
AlonzoEra,
1315
AlonzoTxOut,
1416
MaryValue,
17+
#if __GLASGOW_HASKELL__ >= 914
18+
data AlonzoTxBody,
19+
#else
1520
pattern AlonzoTxBody,
21+
#endif
1622
AlonzoScript,
1723
AlonzoTxAuxData,
1824
Tx (..),

0 commit comments

Comments
 (0)