Skip to content

Commit 9cda0cf

Browse files
authored
Make it build with ghc-9.12 (#1810)
1 parent f197049 commit 9cda0cf

File tree

24 files changed

+90
-84
lines changed

24 files changed

+90
-84
lines changed

.github/workflows/master.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555

5656
- name: Install doctest
5757
run: |
58-
cabal install --ignore-project -j2 doctest --constraint='doctest ^>=0.22'
58+
cabal install --ignore-project -j2 doctest --constraint='doctest ^>=0.24'
5959
6060
- name: Build
6161
run: |

cabal.project

+26-20
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ package *
6161

6262
-- reorder-goals: True
6363

64+
-- Required as a workaround for:
65+
-- https://github.com/haskell-cryptography/HsOpenSSL/issues/95
66+
package HsOpenSSL
67+
ghc-options: -optc=-Wno-discarded-qualifiers -optc=-Wno-deprecated-declarations -optc=-Wno-incompatible-pointer-types
68+
6469
-- Print ticks so that doctest type querying is consistent across GHC versions.
6570
-- This block can be removed when we drop support for GHC 9.4 and below.
6671
if(impl(ghc >= 9.6.1))
@@ -73,24 +78,25 @@ if(impl(ghc >= 9.6.1))
7378
package lzma
7479
flags: -pkgconfig
7580

76-
-- This block is for GHC 9.10.1.
77-
allow-newer: servant-openapi3:base
78-
allow-newer: openapi3:base
79-
allow-newer: openapi3:template-haskell
80-
allow-newer: servant-js:base
81-
allow-newer: servant-js:lens
82-
allow-newer: lucid:base
83-
84-
-- This block is for hashable-1.5
85-
allow-newer: vault:hashable
86-
allow-newer: psqueues:hashable
87-
allow-newer: insert-ordered-containers:hashable
88-
allow-newer: openapi3:hashable
81+
if impl (ghc >= 9.10)
82+
allow-newer: servant-openapi3:base
83+
allow-newer: openapi3:base
84+
allow-newer: openapi3:template-haskell
85+
allow-newer: servant-js:base
86+
allow-newer: servant-js:lens
8987

90-
-- http2-5.3.3 is blacklisted, force http2-5.3.2 or http2-5.3.4
91-
constraints:
92-
http2 ==5.3.2 || ==5.3.4
93-
94-
package HsOpenSSL
95-
-- Fix compilation with GCC >= 14
96-
ghc-options: -optc-Wno-incompatible-pointer-types
88+
if impl (ghc >= 9.12)
89+
allow-newer: servant-swagger-ui:base
90+
allow-newer: servant-swagger-ui-core:base
91+
allow-newer: insert-ordered-containers:base
92+
allow-newer: optics-th:template-haskell
93+
allow-newer: http-api-data:base
94+
allow-newer: openapi3:time
95+
allow-newer: swagger2:time
96+
allow-newer: postgresql-simple:base
97+
allow-newer: postgresql-simple:template-haskell
98+
allow-newer: insert-ordered-containers:hashable
99+
allow-newer: openapi3:hashable
100+
allow-newer: swagger2:base
101+
allow-newer: swagger2:template-haskell
102+
allow-newer: pipes-safe:base

doc/cookbook/custom-errors/CustomErrors.lhs

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ Extensions and imports:
1919
2020
import Data.Aeson
2121
import Data.Proxy
22-
import Data.Text
22+
import Data.Text (Text)
23+
import qualified Data.Text as Text
2324
import GHC.Generics
2425
import Network.Wai
2526
import Network.Wai.Handler.Warp
@@ -67,7 +68,7 @@ server = helloH :<|> postGreetH :<|> deleteGreetH
6768

6869
where helloH name Nothing = helloH name (Just False)
6970
helloH name (Just False) = return . Greet $ "Hello, " <> name
70-
helloH name (Just True) = return . Greet . toUpper $ "Hello, " <> name
71+
helloH name (Just True) = return . Greet . Text.toUpper $ "Hello, " <> name
7172

7273
postGreetH greet = return greet
7374

doc/cookbook/named-routes/cookbook-named-routes.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ author: Servant Contributors
1010
maintainer: [email protected]
1111
build-type: Simple
1212
cabal-version: >=1.10
13-
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.2 || ==9.10.1
13+
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.4 || ==9.10.1 || ==9.12.1
1414

1515
executable cookbook-named-routes
1616
main-is: NamedRoutes.lhs

doc/tutorial/tutorial.cabal

+5-5
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ library
6060
blaze-html >= 0.9.0.1 && < 0.10
6161
, blaze-markup >= 0.8.0.0 && < 0.9
6262
, cookie >= 0.4.3 && < 0.6
63-
, js-jquery >= 3.3.1 && < 3.4
63+
, js-jquery >= 3.3.1 && < 3.8
6464
, lucid >= 2.9.11 && < 2.12
65-
, random >= 1.1 && < 1.3
65+
, random >= 1.1 && < 1.4
6666
, servant-js >= 0.9 && < 0.10
67-
, time >= 1.6.0.1 && < 1.13
67+
, time >= 1.6.0.1 && < 1.15
6868

6969
-- For legacy tools, we need to specify build-depends too
70-
build-depends: markdown-unlit >= 0.5.0 && <0.6
71-
build-tool-depends: markdown-unlit:markdown-unlit >= 0.5.0 && <0.6
70+
build-depends: markdown-unlit >= 0.5.0 && <0.7
71+
build-tool-depends: markdown-unlit:markdown-unlit >= 0.5.0 && <0.7
7272

7373
test-suite spec
7474
type: exitcode-stdio-1.0

servant-auth/servant-auth-client/servant-auth-client.cabal

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ maintainer: [email protected]
1616
copyright: (c) Julian K. Arni
1717
license: BSD-3-Clause
1818
license-file: LICENSE
19-
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.2 || ==9.10.1
19+
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.4 || ==9.10.1 || ==9.12.1
2020
build-type: Simple
2121
extra-source-files:
2222
CHANGELOG.md
@@ -31,9 +31,9 @@ library
3131
default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
3232
ghc-options: -Wall
3333
build-depends:
34-
base >= 4.16.4.0 && < 4.21
35-
, bytestring >= 0.11 && < 0.13
36-
, containers >=0.6.5.1 && < 0.8
34+
base >= 4.16.4.0 && < 4.22
35+
, bytestring >= 0.10.6.0 && < 0.13
36+
, containers >=0.6.5.1 && < 0.9
3737
, servant-auth >= 0.4.2.0 && < 0.5
3838
, servant >= 0.20.2 && < 0.21
3939
, servant-client-core >= 0.20.2 && < 0.21
@@ -70,7 +70,7 @@ test-suite spec
7070
, http-types >= 0.12.2 && < 0.13
7171
, servant-auth-server >= 0.4.2.0 && < 0.5
7272
, servant-server >= 0.20.2 && < 0.21
73-
, time >= 1.5.0.1 && < 1.13
73+
, time >= 1.5.0.1 && < 1.15
7474
, transformers >= 0.4.2.0 && < 0.7
7575
, wai >= 3.2.1.2 && < 3.3
7676
, warp >= 3.2.25 && < 3.5

servant-auth/servant-auth-docs/servant-auth-docs.cabal

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ maintainer: [email protected]
1616
copyright: (c) Julian K. Arni
1717
license: BSD-3-Clause
1818
license-file: LICENSE
19-
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.2 || ==9.10.1
19+
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.4 || ==9.10.1 || ==9.12.1
2020
build-type: Custom
2121
extra-source-files:
2222
CHANGELOG.md
2323

2424
custom-setup
2525
setup-depends:
26-
base >= 4.16.4.0 && < 4.21,
26+
base >= 4.16.4.0 && < 4.22,
2727
Cabal < 4, cabal-doctest >=1.0.6 && <1.1
2828

2929
source-repository head
@@ -36,7 +36,7 @@ library
3636
default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
3737
ghc-options: -Wall
3838
build-depends:
39-
base >= 4.16.4.0 && < 4.21
39+
base >= 4.16.4.0 && < 4.22
4040
, servant-docs >= 0.13.1 && < 0.14
4141
, servant >= 0.20.2 && < 0.21
4242
, servant-auth >= 0.4.2.0 && < 0.5
@@ -51,7 +51,7 @@ test-suite doctests
5151
build-depends:
5252
base,
5353
servant-auth-docs,
54-
doctest >= 0.16 && < 0.23,
54+
doctest >= 0.16 && < 0.25,
5555
QuickCheck >= 2.11.3 && < 2.16,
5656
template-haskell
5757
ghc-options: -Wall -threaded

servant-auth/servant-auth-server/servant-auth-server.cabal

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ maintainer: [email protected]
1616
copyright: (c) Julian K. Arni
1717
license: BSD-3-Clause
1818
license-file: LICENSE
19-
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.2 || ==9.10.1
19+
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.4 || ==9.10.1 || ==9.12.1
2020
build-type: Simple
2121
extra-source-files:
2222
CHANGELOG.md
@@ -31,7 +31,7 @@ library
3131
default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
3232
ghc-options: -Wall
3333
build-depends:
34-
base >= 4.16.4.0 && < 4.21
34+
base >= 4.16.4.0 && < 4.22
3535
, aeson >= 1.0.0.1 && < 3
3636
, base64-bytestring >= 1.0.0.1 && < 2
3737
, blaze-builder >= 0.4.1.0 && < 0.5
@@ -51,7 +51,7 @@ library
5151
, servant-server >= 0.20.2 && < 0.21
5252
, tagged >= 0.8.4 && < 0.9
5353
, text >= 1.2.3.0 && < 2.2
54-
, time >= 1.5.0.1 && < 1.13
54+
, time >= 1.5.0.1 && < 1.15
5555
, unordered-containers >= 0.2.9.0 && < 0.3
5656
, wai >= 3.2.1.2 && < 3.3
5757

servant-auth/servant-auth-swagger/servant-auth-swagger.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ maintainer: [email protected]
1616
copyright: (c) Julian K. Arni
1717
license: BSD-3-Clause
1818
license-file: LICENSE
19-
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.2 || ==9.10.1
19+
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.4 || ==9.10.1 || ==9.12.1
2020
build-type: Simple
2121
extra-source-files:
2222
CHANGELOG.md
@@ -31,7 +31,7 @@ library
3131
default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
3232
ghc-options: -Wall
3333
build-depends:
34-
base >= 4.16.4.0 && < 4.21
34+
base >= 4.16.4.0 && < 4.22
3535
, text >= 1.2.3.0 && < 2.2
3636
, servant-swagger >= 1.2.1 && < 2
3737
, swagger2 >= 2.2.2 && < 3

servant-auth/servant-auth/servant-auth.cabal

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ maintainer: [email protected]
1818
copyright: (c) Julian K. Arni
1919
license: BSD-3-Clause
2020
license-file: LICENSE
21-
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.2 || ==9.10.1
21+
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.4 || ==9.10.1 || ==9.12.1
2222
build-type: Simple
2323
extra-source-files:
2424
CHANGELOG.md
@@ -33,8 +33,8 @@ library
3333
default-extensions: ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
3434
ghc-options: -Wall
3535
build-depends:
36-
base >= 4.16.4.0 && < 4.21
37-
, containers >=0.6.5.1 && < 0.8
36+
base >= 4.16.4.0 && < 4.22
37+
, containers >=0.6.5.1 && < 0.9
3838
, aeson >= 2.0 && < 3
3939
, jose >= 0.10 && < 0.12
4040
, lens >= 4.16.1 && < 5.4

servant-client-core/servant-client-core.cabal

+4-5
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ copyright:
1919
2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors
2020

2121
build-type: Simple
22-
tested-with:
23-
GHC ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.2 || ==9.10.1
22+
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.4 || ==9.10.1 || ==9.12.1
2423

2524
extra-source-files:
2625
CHANGELOG.md
@@ -103,12 +102,12 @@ library
103102
--
104103
-- note: mtl lower bound is so low because of GHC-7.8
105104
build-depends:
106-
base >= 4.16.4.0 && < 4.21
105+
, base >= 4.16.4.0 && < 4.22
107106
, bytestring >=0.11 && <0.13
108107
, constraints >=0.2 && <0.15
109-
, containers >=0.6.5.1 && <0.8
108+
, containers >=0.6.5.1 && <0.9
110109
, deepseq >=1.4.2.0 && <1.6
111-
, template-haskell >=2.11.1.0 && <2.23
110+
, template-haskell >=2.11.1.0 && <2.24
112111
, text >=1.2.3.0 && <2.2
113112

114113
-- Servant dependencies

servant-client/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This library lets you automatically derive Haskell functions that let you query
1111
{-# LANGUAGE TypeOperators #-}
1212

1313
import Data.Proxy
14-
import Data.Text
14+
import Data.Text (Text)
1515
import Network.HTTP.Client (newManager, defaultManagerSettings)
1616
import Servant.API
1717
import Servant.Client

servant-client/servant-client.cabal

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ copyright:
2121
2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors
2222

2323
build-type: Simple
24-
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.2 || ==9.10.1
24+
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.4 || ==9.10.1 || ==9.12.1
2525

2626
extra-source-files:
2727
CHANGELOG.md
@@ -93,13 +93,13 @@ library
9393
-- Bundled with GHC: Lower bound to not force re-installs
9494
-- text and mtl are bundled starting with GHC-8.4
9595
build-depends:
96-
base >= 4.16.4.0 && < 4.21
96+
, base >= 4.16.4.0 && < 4.22
9797
, bytestring >=0.11 && <0.13
98-
, containers >=0.6.5.1 && <0.8
98+
, containers >=0.6.5.1 && <0.9
9999
, deepseq >=1.4.2.0 && <1.6
100100
, mtl ^>=2.2.2 || ^>=2.3.1
101101
, stm >=2.4.5.1 && <2.6
102-
, time >=1.6.0.1 && <1.13
102+
, time >=1.6.0.1 && <1.15
103103
, transformers >=0.5.2.0 && <0.7
104104

105105
-- Servant dependencies.

servant-conduit/servant-conduit.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ author: Servant Contributors
1616
maintainer: [email protected]
1717
copyright: 2018-2019 Servant Contributors
1818
build-type: Simple
19-
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.2 || ==9.10.1
19+
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.4 || ==9.10.1 || ==9.12.1
2020

2121
extra-source-files:
2222
CHANGELOG.md
@@ -28,7 +28,7 @@ source-repository head
2828
library
2929
exposed-modules: Servant.Conduit
3030
build-depends:
31-
base >= 4.16.4.0 && < 4.21
31+
base >= 4.16.4.0 && < 4.22
3232
, bytestring >=0.11 && <0.13
3333
, conduit >=1.3.1 && <1.4
3434
, mtl ^>=2.2.2 || ^>=2.3.1

servant-docs/servant-docs.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ author: Servant Contributors
1919
maintainer: [email protected]
2020
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors
2121
build-type: Simple
22-
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.2 || ==9.10.1
22+
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.4 || ==9.10.1 || ==9.12.1
2323

2424
extra-source-files:
2525
CHANGELOG.md
@@ -41,7 +41,7 @@ library
4141
--
4242
-- note: mtl lower bound is so low because of GHC-7.8
4343
build-depends:
44-
base >= 4.16.4.0 && < 4.21
44+
base >= 4.16.4.0 && < 4.22
4545
, bytestring >= 0.11 && < 0.13
4646
, text >= 1.2.3.0 && < 2.2
4747

servant-foreign/servant-foreign.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ author: Servant Contributors
2121
maintainer: [email protected]
2222
copyright: 2015-2019 Servant Contributors
2323
build-type: Simple
24-
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.2 || ==9.10.1
24+
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.4 || ==9.10.1 || ==9.12.1
2525

2626
extra-source-files:
2727
CHANGELOG.md
@@ -41,7 +41,7 @@ library
4141
--
4242
-- note: mtl lower bound is so low because of GHC-7.8
4343
build-depends:
44-
base >= 4.16.4.0 && < 4.21
44+
base >= 4.16.4.0 && < 4.22
4545
, text >= 1.2.3.0 && < 2.2
4646

4747
-- Servant dependencies

servant-http-streams/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This library lets you automatically derive Haskell functions that let you query
1111
{-# LANGUAGE TypeOperators #-}
1212

1313
import Data.Proxy
14-
import Data.Text
14+
import Data.Text (Text)
1515
import Servant.API
1616
import Servant.HttpStreams
1717

servant-http-streams/servant-http-streams.cabal

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ author: Servant Contributors
2020
maintainer: [email protected]
2121
copyright: 2019 Servant Contributors
2222
build-type: Simple
23-
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.4 || ==9.8.2 || ==9.10.1
23+
tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.4 || ==9.10.1 || ==9.12.1
2424

2525
extra-source-files:
2626
CHANGELOG.md
@@ -38,13 +38,13 @@ library
3838
-- Bundled with GHC: Lower bound to not force re-installs
3939
-- text and mtl are bundled starting with GHC-8.4
4040
build-depends:
41-
base >= 4.16.4.0 && < 4.21
41+
base >= 4.16.4.0 && < 4.22
4242
, bytestring >= 0.11 && < 0.13
43-
, containers >= 0.6.5.1 && < 0.8
43+
, containers >= 0.6.5.1 && < 0.9
4444
, deepseq >= 1.4.2.0 && < 1.6
4545
, mtl ^>= 2.2.2 || ^>= 2.3.1
4646
, text >= 1.2.3.0 && < 2.2
47-
, time >= 1.6.0.1 && < 1.13
47+
, time >= 1.6.0.1 && < 1.15
4848
, transformers >= 0.5.2.0 && < 0.7
4949

5050
if !impl(ghc >= 8.2)

0 commit comments

Comments
 (0)