Skip to content

Commit 2a281b2

Browse files
committed
Preliminary ghc 9.14 support
Currently using ghc-9.14.0.20251007.
1 parent 8e5ee55 commit 2a281b2

File tree

128 files changed

+1666
-98
lines changed

Some content is hidden

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

128 files changed

+1666
-98
lines changed

cabal.project

Lines changed: 213 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,217 @@ 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: 8a12ec250b3bfefc12108d04e3ea5a9b473b0028
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+
, base64-bytestring-type:base
143+
, base64-bytestring-type:http-api-data
144+
, bifunctors:containers
145+
, bifunctors:template-haskell
146+
, bin:base
147+
, binary-orphans:base
148+
, boring:base
149+
, boring:tagged
150+
, brick:base
151+
, canonical-json:containers
152+
, cborg:base
153+
, cborg:containers
154+
, concurrent-output:process
155+
, config-ini:containers
156+
, config-ini:megaparsec
157+
, constraints:boring
158+
, constraints:hashable
159+
, constraints-extras:base
160+
, constraints-extras:template-haskell
161+
, containers:base
162+
, containers:deepseq
163+
, containers:template-haskell
164+
, cuddle:foldable1-classes-compat
165+
, cuddle:megaparsec
166+
, data-default:containers
167+
, data-default-class:data-default
168+
, data-fix:base
169+
, dec:base
170+
, deepseq:base
171+
, deepseq:ghc-prim
172+
, dependent-map:constraints-extras
173+
, dependent-map:containers
174+
, deriving-compat:containers
175+
, deriving-compat:template-haskell
176+
, dictionary-sharing:containers
177+
, directory:base
178+
, directory:time
179+
, dom-lt:containers
180+
, filepath:bytestring
181+
, filepath:template-haskell
182+
, fin:base
183+
, fin:universe-base
184+
, foldable1-classes-compat:base
185+
, foldl:containers
186+
, free:containers
187+
, free:template-haskell
188+
, free:transformers
189+
, generically:base
190+
, ghc-heap:containers
191+
, ghc-heap:ghc-internal
192+
, hashable:base
193+
, hashable:bytestring
194+
, hashable:containers
195+
, hashable:ghc-bignum
196+
, hashable:ghc-prim
197+
, hedgehog:async
198+
, hedgehog:containers
199+
, hedgehog:template-haskell
200+
, hedgehog:time
201+
, hsc2hs:base
202+
, http-api-data:base
203+
, http-api-data:containers
204+
, indexed-traversable:base
205+
, indexed-traversable:containers
206+
, indexed-traversable-instances:OneTuple
207+
, indexed-traversable-instances:base
208+
, integer-conversion:base
209+
, integer-logarithms:base
210+
, integer-logarithms:ghc-bignum
211+
, io-classes:base
212+
, io-classes:time
213+
, ledger-state:persistent
214+
, lens:containers
215+
, lens:parallel
216+
, lens:template-haskell
217+
, megaparsec:containers
218+
, microlens-th:containers
219+
, microlens-th:template-haskell
220+
, microstache:base
221+
, microstache:containers
222+
, monoidal-containers:base
223+
, monoidal-containers:containers
224+
, nonempty-vector:base
225+
, nothunks:containers
226+
, nothunks:time
227+
, nothunks:wherefrom-compat
228+
, optics-core:containers
229+
, ordered-containers:containers
230+
, parallel:base
231+
, persistent:template-haskell
232+
, persistent-sqlite:persistent
233+
, plutus-core:dependent-map
234+
, primitive:base
235+
, process:base
236+
, process:directory
237+
, quickcheck-instances:base
238+
, quickcheck-instances:containers
239+
, quickcheck-instances:data-fix
240+
, quickcheck-instances:time-compat
241+
, ral:base
242+
, recursion-schemes:containers
243+
, recursion-schemes:template-haskell
244+
, scientific:base
245+
, scientific:containers
246+
, scientific:template-haskell
247+
, semialign:base
248+
, semialign:containers
249+
, semialign:indexed-traversable
250+
, semialign:indexed-traversable-instances
251+
, semigroupoids:bifunctors
252+
, serialise:base
253+
, serialise:containers
254+
, serialise:ghc-prim
255+
, serialise:these
256+
, serialise:time
257+
, singletons:base
258+
, singletons-th:base
259+
, singletons-th:singletons
260+
, singletons-th:template-haskell
261+
, singletons-th:th-desugar
262+
, singletons-th:th-orphans
263+
, size-based:template-haskell
264+
, some:base
265+
, splitmix:base
266+
, tagged:template-haskell
267+
, tasty-hedgehog:base
268+
, text:bytestring
269+
, text-iso8601:time
270+
, text-short:base
271+
, text-short:ghc-prim
272+
, text-short:template-haskell
273+
, th-abstraction:containers
274+
, th-abstraction:template-haskell
275+
, th-compat:template-haskell
276+
, th-desugar:template-haskell
277+
, th-expand-syns:base
278+
, th-expand-syns:containers
279+
, th-expand-syns:template-haskell
280+
, th-lift:template-haskell
281+
, th-lift-instances:th-lift
282+
, th-orphans:template-haskell
283+
, these:assoc
284+
, these:base
285+
, time-compat:base
286+
, time-compat:time
287+
, transformers:base
288+
, tree-diff:aeson
289+
, tree-diff:base
290+
, tree-diff:containers
291+
, tree-diff:scientific
292+
, tree-diff:semialign
293+
, tree-diff:time
294+
, tree-diff:unordered-containers
295+
, universe-base:base
296+
, universe-base:containers
297+
, unordered-containers:base
298+
, unordered-containers:template-haskell
299+
, uuid-types:deepseq
300+
, uuid-types:template-haskell
301+
, validation-selective:base
302+
, vault:base
303+
, vault:containers
304+
, vector-th-unbox:base
305+
, vector-th-unbox:template-haskell
306+
, wherefrom-compat:base
307+
, wherefrom-compat:ghc-heap
308+
, 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,
@@ -94,10 +99,17 @@ import Cardano.Ledger.MemoBytes.Internal (mkMemoBytes)
9499
import Cardano.Ledger.Shelley.Scripts (
95100
ShelleyEraScript (..),
96101
nativeMultiSigTag,
102+
#if __GLASGOW_HASKELL__ >= 914
103+
data RequireAllOf,
104+
data RequireAnyOf,
105+
data RequireMOf,
106+
data RequireSignature,
107+
#else
97108
pattern RequireAllOf,
98109
pattern RequireAnyOf,
99110
pattern RequireMOf,
100111
pattern RequireSignature,
112+
#endif
101113
)
102114
import Cardano.Slotting.Slot (SlotNo (..))
103115
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 (..),

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE PatternSynonyms #-}
3+
{-# LANGUAGE TypeFamilies #-}
24

35
module Cardano.Ledger.Alonzo.Core (
46
AlonzoEraTx (..),
@@ -8,10 +10,17 @@ module Cardano.Ledger.Alonzo.Core (
810
AsIx (..),
911
AsItem (..),
1012
AsIxItem (..),
13+
#if __GLASGOW_HASKELL__ >= 914
14+
data SpendingPurpose,
15+
data MintingPurpose,
16+
data CertifyingPurpose,
17+
data RewardingPurpose,
18+
#else
1119
pattern SpendingPurpose,
1220
pattern MintingPurpose,
1321
pattern CertifyingPurpose,
1422
pattern RewardingPurpose,
23+
#endif
1524
ScriptIntegrityHash,
1625
AlonzoEraTxBody (..),
1726
AlonzoEraTxWits (..),
@@ -62,10 +71,17 @@ import Cardano.Ledger.Alonzo.Scripts (
6271
AsItem (..),
6372
AsIx (..),
6473
AsIxItem (..),
74+
#if __GLASGOW_HASKELL__ >= 914
75+
data CertifyingPurpose,
76+
data MintingPurpose,
77+
data RewardingPurpose,
78+
data SpendingPurpose,
79+
#else
6580
pattern CertifyingPurpose,
6681
pattern MintingPurpose,
6782
pattern RewardingPurpose,
6883
pattern SpendingPurpose,
84+
#endif
6985
)
7086
import Cardano.Ledger.Alonzo.Tx (AlonzoEraTx (..), IsValid (..))
7187
import Cardano.Ledger.Alonzo.TxAuxData (AlonzoEraTxAuxData (..))

0 commit comments

Comments
 (0)