Skip to content

Commit 7e77aee

Browse files
committed
Preliminary ghc9.14 support
Currently using ghc-9.14.0.20250908.
1 parent ce84c20 commit 7e77aee

File tree

12 files changed

+276
-4
lines changed

12 files changed

+276
-4
lines changed

cabal.project

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,197 @@ allow-newer:
8383
-- https://github.com/IntersectMBO/plutus/pull/7236
8484
constraints: setup.optparse-applicative >=0.19.0.0
8585
allow-newer: turtle:optparse-applicative
86+
87+
if impl (ghc >= 9.14)
88+
-- https://github.com/snowleopard/alga/issues/322
89+
source-repository-package
90+
type: git
91+
location: https://github.com/snowleopard/alga/
92+
tag: d4e43fb42db05413459fb2df493361d5a666588a
93+
94+
-- cabal-allow-newer
95+
if impl (ghc >= 9.14)
96+
allow-newer:
97+
, Cabal:Cabal-syntax
98+
, Cabal:containers
99+
, OneTuple:base
100+
, QuickCheck:splitmix
101+
, aeson:OneTuple
102+
, aeson:containers
103+
, aeson:data-fix
104+
, aeson:ghc-prim
105+
, aeson:indexed-traversable
106+
, aeson:scientific
107+
, aeson:semialign
108+
, aeson:template-haskell
109+
, aeson:text-iso8601
110+
, aeson:these
111+
, aeson:time
112+
, aeson:time-compat
113+
, aeson:witherable
114+
, assoc:base
115+
, async:base
116+
, base:ghc-prim
117+
, bifunctors:template-haskell
118+
, bin:base
119+
, binary:containers
120+
, binary-orphans:base
121+
, boring:base
122+
, brick:base
123+
, canonical-json:containers
124+
, cardano-crypto-class:io-classes
125+
, cardano-prelude:base
126+
, cborg:base
127+
, cborg:containers
128+
, cborg:ghc-prim
129+
, concurrent-output:process
130+
, config-ini:containers
131+
, config-ini:text
132+
, constraints-extras:base
133+
, constraints-extras:template-haskell
134+
, containers:base
135+
, containers:template-haskell
136+
, criterion:aeson
137+
, data-default:containers
138+
, data-default-class:data-default
139+
, data-fix:base
140+
, dec:base
141+
, deepseq:base
142+
, deepseq:ghc-prim
143+
, dependent-map:containers
144+
, deriving-compat:containers
145+
, deriving-compat:template-haskell
146+
, dictionary-sharing:containers
147+
, directory:base
148+
, directory:time
149+
, dom-lt:containers
150+
, fin:base
151+
, fin:universe-base
152+
, foldl:containers
153+
, free:containers
154+
, free:template-haskell
155+
, generically:base
156+
, ghc-heap:containers
157+
, hashable:base
158+
, hashable:containers
159+
, hashable:ghc-bignum
160+
, hedgehog:containers
161+
, hedgehog:template-haskell
162+
, hedgehog:time
163+
, hedgehog-fn:hedgehog
164+
, hsc2hs:base
165+
, indexed-traversable:base
166+
, indexed-traversable:containers
167+
, indexed-traversable-instances:base
168+
, integer-conversion:base
169+
, integer-logarithms:base
170+
, integer-logarithms:ghc-bignum
171+
, io-classes:base
172+
, io-classes:time
173+
, lens:containers
174+
, lens:free
175+
, lens:template-haskell
176+
, list-t:foldl
177+
, megaparsec:base
178+
, megaparsec:containers
179+
, megaparsec:transformers
180+
, microlens-mtl:microlens
181+
, microlens-th:containers
182+
, microlens-th:template-haskell
183+
, microstache:aeson
184+
, microstache:base
185+
, microstache:containers
186+
, microstache:unordered-containers
187+
, microstache:vector
188+
, monoidal-containers:base
189+
, monoidal-containers:containers
190+
, network-uri:th-compat
191+
, nonempty-vector:base
192+
, nothunks:containers
193+
, nothunks:time
194+
, nothunks:wherefrom-compat
195+
, ordered-containers:containers
196+
, os-string:template-haskell
197+
, parallel:base
198+
, parsec:text
199+
, plutus-core:dependent-map
200+
, plutus-core:microlens-th
201+
, plutus-core:vty
202+
, primitive:base
203+
, process:base
204+
, process:unix
205+
, quickcheck-instances:base
206+
, quickcheck-instances:containers
207+
, ral:base
208+
, ral:boring
209+
, recursion-schemes:containers
210+
, recursion-schemes:template-haskell
211+
, scientific:base
212+
, scientific:containers
213+
, scientific:integer-logarithms
214+
, scientific:template-haskell
215+
, semialign:base
216+
, semialign:containers
217+
, semigroupoids:bifunctors
218+
, serialise:base
219+
, serialise:containers
220+
, serialise:ghc-prim
221+
, serialise:time
222+
, singletons:base
223+
, singletons-th:base
224+
, singletons-th:singletons
225+
, singletons-th:template-haskell
226+
, singletons-th:th-desugar
227+
, singletons-th:th-orphans
228+
, size-based:template-haskell
229+
, some:base
230+
, splitmix:base
231+
, statistics:parallel
232+
, tagged:base
233+
, tagged:template-haskell
234+
, tasty:base
235+
, tasty:tagged
236+
, tasty-golden:tasty
237+
, tasty-hedgehog:base
238+
, tasty-hedgehog:hedgehog
239+
, test-framework:time
240+
, text:binary
241+
, text:bytestring
242+
, text:template-haskell
243+
, text-iso8601:time
244+
, text-short:base
245+
, text-short:bytestring
246+
, text-short:ghc-prim
247+
, text-short:template-haskell
248+
, th-abstraction:template-haskell
249+
, th-compat:template-haskell
250+
, th-desugar:template-haskell
251+
, th-expand-syns:base
252+
, th-expand-syns:containers
253+
, th-expand-syns:template-haskell
254+
, th-lift:template-haskell
255+
, th-lift-instances:th-lift
256+
, th-orphans:template-haskell
257+
, these:base
258+
, time-compat:base
259+
, time-compat:deepseq
260+
, time-compat:time
261+
, transformers:base
262+
, tree-diff:QuickCheck
263+
, tree-diff:base
264+
, tree-diff:containers
265+
, tree-diff:time
266+
, turtle:containers
267+
, turtle:time
268+
, typed-process:async
269+
, universe-base:base
270+
, universe-base:containers
271+
, unix:time
272+
, unordered-containers:hashable
273+
, unordered-containers:template-haskell
274+
, uuid-types:template-haskell
275+
, vector-th-unbox:base
276+
, vector-th-unbox:template-haskell
277+
, wherefrom-compat:base
278+
, wherefrom-compat:ghc-heap
279+
, witherable:containers

plutus-core/plutus-core/src/PlutusCore/Core/Instance/Eq.hs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
{-# OPTIONS_GHC -fno-warn-orphans #-}
55

6+
{-# LANGUAGE CPP #-}
67
{-# LANGUAGE FlexibleInstances #-}
78
{-# LANGUAGE RankNTypes #-}
89
{-# LANGUAGE TypeApplications #-}
@@ -51,9 +52,14 @@ deriving stock instance
5152
(GEq uni, Closed uni, uni `Everywhere` Eq, Eq ann) =>
5253
Eq (Type TyDeBruijn uni ann)
5354

54-
deriving stock instance (GEq uni, Closed uni, uni `Everywhere` Eq, Eq fun, Eq ann,
55-
Eq (Term tyname name uni fun ann)
56-
) => Eq (Program tyname name uni fun ann)
55+
deriving stock instance (
56+
#if __GLASGOW_HASKELL__ < 914
57+
-- These constraints are REQUIERD for ghc < 9.14 but REDUNDANT for ghc >= 9.14
58+
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/26381#note_637863
59+
GEq uni, Closed uni, Eq fun,
60+
#endif
61+
uni `Everywhere` Eq, Eq ann,
62+
Eq (Term tyname name uni fun ann) ) => Eq (Program tyname name uni fun ann)
5763

5864
type EqRenameOf ren a = HasUniques a => a -> a -> EqRename ren
5965

plutus-core/plutus-core/src/PlutusCore/Error.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE DeriveAnyClass #-}
23
{-# LANGUAGE FlexibleInstances #-}
34
{-# LANGUAGE FunctionalDependencies #-}
@@ -10,6 +11,12 @@
1011
{-# OPTIONS_GHC -fno-warn-orphans #-}
1112
-- appears in the generated instances
1213

14+
#if __GLASGOW_HASKELL__ >= 914
15+
-- The `ghc-9.14` alpha release has what looks like a bug;
16+
-- https://gitlab.haskell.org/ghc/ghc/-/issues/26381
17+
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
18+
#endif
19+
1320
module PlutusCore.Error
1421
( ParserError (..)
1522
, ParserErrorBundle (..)

plutus-core/plutus-ir/src/PlutusIR/Core/Instance/Flat.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE DeriveAnyClass #-}
23
{-# LANGUAGE TypeOperators #-}
34
{-# LANGUAGE UndecidableInstances #-}
45
{-# OPTIONS_GHC -Wno-orphans #-}
6+
7+
#if __GLASGOW_HASKELL__ >= 914
8+
-- The `ghc-9.14` alpha release has what looks like a bug;
9+
-- https://gitlab.haskell.org/ghc/ghc/-/issues/26381
10+
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
11+
#endif
12+
513
module PlutusIR.Core.Instance.Flat () where
614

715
import PlutusIR.Core.Type

plutus-core/plutus-ir/test/PlutusCore/Generators/QuickCheck/SubstitutionTests.hs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
-- editorconfig-checker-disable-file
2+
3+
{-# LANGUAGE CPP #-}
4+
5+
#if __GLASGOW_HASKELL__ >= 914
6+
-- The `ghc-9.14` alpha release has what looks like a bug;
7+
-- https://gitlab.haskell.org/ghc/ghc/-/issues/26381
8+
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
9+
#endif
10+
211
module PlutusCore.Generators.QuickCheck.SubstitutionTests where
312

413
import PlutusCore.Generators.QuickCheck

plutus-core/testlib/PlutusCore/Generators/QuickCheck/Common.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE FlexibleInstances #-}
23
{-# LANGUAGE LambdaCase #-}
34
{-# LANGUAGE MultiParamTypeClasses #-}
@@ -6,6 +7,12 @@
67

78
{-# OPTIONS_GHC -Wno-orphans #-}
89

10+
#if __GLASGOW_HASKELL__ >= 914
11+
-- The `ghc-9.14` alpha release has what looks like a bug;
12+
-- https://gitlab.haskell.org/ghc/ghc/-/issues/26381
13+
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
14+
#endif
15+
916
module PlutusCore.Generators.QuickCheck.Common where
1017

1118
import PlutusPrelude

plutus-core/untyped-plutus-core/src/UntypedPlutusCore/Core/Instance/Eq.hs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
-- editorconfig-checker-disable-file
22
{-# OPTIONS_GHC -fno-warn-orphans #-}
33

4+
{-# LANGUAGE CPP #-}
45
{-# LANGUAGE ConstraintKinds #-}
56
{-# LANGUAGE FlexibleInstances #-}
67
{-# LANGUAGE TypeOperators #-}
@@ -65,7 +66,13 @@ deriving stock instance
6566

6667
instance HashableTermConstraints uni fun ann => Hashable (Term DeBruijn uni fun ann)
6768

68-
deriving stock instance (GEq uni, Closed uni, uni `Everywhere` Eq, Eq fun, Eq ann,
69+
deriving stock instance (
70+
#if __GLASGOW_HASKELL__ < 914
71+
-- These constraints are REQUIERD for ghc < 9.14 but REDUNDANT for ghc >= 9.14
72+
-- See https://gitlab.haskell.org/ghc/ghc/-/issues/26381#note_637863
73+
GEq uni, Closed uni, Eq fun,
74+
#endif
75+
uni `Everywhere` Eq, Eq ann,
6976
Eq (Term name uni fun ann)
7077
) => Eq (Program name uni fun ann)
7178

plutus-ledger-api/src/PlutusLedgerApi/V1/Interval.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE DeriveAnyClass #-}
23
{-# LANGUAGE FlexibleInstances #-}
34
{-# LANGUAGE NoImplicitPrelude #-}
@@ -13,6 +14,12 @@
1314
{-# LANGUAGE TypeFamilies #-}
1415
{-# LANGUAGE TypeOperators #-}
1516

17+
#if __GLASGOW_HASKELL__ >= 914
18+
-- The `ghc-9.14` alpha release has what looks like a bug;
19+
-- https://gitlab.haskell.org/ghc/ghc/-/issues/26381
20+
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
21+
#endif
22+
1623
-- | A type for intervals and associated functions.
1724
module PlutusLedgerApi.V1.Interval
1825
( Interval(..)

plutus-tx/src/PlutusTx/Blueprint/Schema.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{-# LANGUAGE AllowAmbiguousTypes #-}
2+
{-# LANGUAGE CPP #-}
23
{-# LANGUAGE DataKinds #-}
34
{-# LANGUAGE DeriveAnyClass #-}
45
{-# LANGUAGE DeriveDataTypeable #-}
@@ -12,6 +13,12 @@
1213
{-# LANGUAGE TypeFamilies #-}
1314
{-# LANGUAGE UndecidableInstances #-}
1415

16+
#if __GLASGOW_HASKELL__ >= 914
17+
-- The `ghc-9.14` alpha release has what looks like a bug;
18+
-- https://gitlab.haskell.org/ghc/ghc/-/issues/26381
19+
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
20+
#endif
21+
1522
module PlutusTx.Blueprint.Schema where
1623

1724
import Control.Lens.Plated (Plated)

plutus-tx/src/PlutusTx/Builtins/HasOpaque.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
{-# OPTIONS_GHC -fno-omit-interface-pragmas #-}
1212
{-# OPTIONS_GHC -fno-specialise #-}
1313

14+
#if __GLASGOW_HASKELL__ >= 914
15+
-- The `ghc-9.14` alpha release has what looks like a bug;
16+
-- https://gitlab.haskell.org/ghc/ghc/-/issues/26381
17+
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
18+
#endif
19+
1420
module PlutusTx.Builtins.HasOpaque where
1521

1622
import Control.DeepSeq (NFData (..))

0 commit comments

Comments
 (0)