Skip to content

Commit 46ca313

Browse files
committed
cabal: Set default-language: Haskell2010
Otherwise GHC 9.2 will compile the package as GHC2021, which will break due to a Safe Haskell error. See GHC #19631.
1 parent 6d3cb9f commit 46ca313

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

binary.cabal

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
cabal-version: 3.0
2+
13
-- To run tests and binaries you'll need to rename the name of the library
24
-- and all the local dependencies on it. If not, cabal is unable to come up
35
-- with a build plan.
@@ -25,7 +27,6 @@ synopsis: Binary serialisation for Haskell values using lazy ByteStrings
2527
category: Data, Parsing
2628
stability: provisional
2729
build-type: Simple
28-
cabal-version: >= 1.8
2930
tested-with: GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2, GHC ==8.2.2, GHC == 8.4.4, GHC == 8.6.5
3031
extra-source-files:
3132
README.md changelog.md docs/hcar/binary-Lb.tex tools/derive/*.hs
@@ -59,6 +60,7 @@ library
5960

6061
if impl(ghc >= 8.0)
6162
ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances
63+
default-language: Haskell2010
6264

6365
test-suite qc
6466
type: exitcode-stdio-1.0
@@ -83,6 +85,7 @@ test-suite qc
8385
if impl(ghc <= 7.6)
8486
-- prior to ghc-7.4 generics lived in ghc-prim
8587
build-depends: ghc-prim
88+
default-language: Haskell2010
8689

8790

8891
test-suite read-write-file
@@ -104,6 +107,7 @@ test-suite read-write-file
104107
if impl(ghc <= 7.6)
105108
-- prior to ghc-7.4 generics lived in ghc-prim
106109
build-depends: ghc-prim
110+
default-language: Haskell2010
107111

108112

109113
benchmark bench
@@ -124,6 +128,7 @@ benchmark bench
124128
if impl(ghc <= 7.6)
125129
-- prior to ghc-7.4 generics lived in ghc-prim
126130
build-depends: ghc-prim
131+
default-language: Haskell2010
127132

128133

129134
benchmark get
@@ -145,6 +150,7 @@ benchmark get
145150
if impl(ghc <= 7.6)
146151
-- prior to ghc-7.4 generics lived in ghc-prim
147152
build-depends: ghc-prim
153+
default-language: Haskell2010
148154

149155

150156
benchmark put
@@ -163,6 +169,7 @@ benchmark put
163169
if impl(ghc <= 7.6)
164170
-- prior to ghc-7.4 generics lived in ghc-prim
165171
build-depends: ghc-prim
172+
default-language: Haskell2010
166173

167174
benchmark generics-bench
168175
type: exitcode-stdio-1.0
@@ -192,6 +199,7 @@ benchmark generics-bench
192199
if impl(ghc <= 7.6)
193200
-- prior to ghc-7.4 generics lived in ghc-prim
194201
build-depends: ghc-prim
202+
default-language: Haskell2010
195203

196204
benchmark builder
197205
type: exitcode-stdio-1.0
@@ -210,3 +218,4 @@ benchmark builder
210218
if impl(ghc <= 7.6)
211219
-- prior to ghc-7.4 generics lived in ghc-prim
212220
build-depends: ghc-prim
221+
default-language: Haskell2010

0 commit comments

Comments
 (0)