Support GHC-9.0.1

This commit is contained in:
Maxim Koltsov 2021-04-05 17:35:39 +03:00
parent cc67b9ec6e
commit 61111178f0
No known key found for this signature in database
GPG Key ID: 52B5EDB68BF54442
13 changed files with 33 additions and 32 deletions

View File

@ -13,7 +13,7 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest] os: [ubuntu-latest]
cabal: ["3.2"] cabal: ["3.4"]
ghc: ghc:
- "8.0.2" - "8.0.2"
- "8.2.2" - "8.2.2"
@ -21,6 +21,7 @@ jobs:
- "8.6.5" - "8.6.5"
- "8.8.4" - "8.8.4"
- "8.10.2" - "8.10.2"
- "9.0.1"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View File

@ -3,8 +3,7 @@ packages:
servant-client/ servant-client/
servant-client-core/ servant-client-core/
servant-http-streams/ servant-http-streams/
-- Tests failing with Cabal (TODO: investigate) servant-docs/
-- servant-docs/
servant-foreign/ servant-foreign/
servant-server/ servant-server/
doc/tutorial/ doc/tutorial/
@ -26,7 +25,8 @@ packages:
doc/cookbook/custom-errors doc/cookbook/custom-errors
doc/cookbook/basic-streaming doc/cookbook/basic-streaming
doc/cookbook/db-postgres-pool doc/cookbook/db-postgres-pool
doc/cookbook/db-sqlite-simple --doc/cookbook/db-sqlite-simple
-- ^ BROKEN blaze-textual
doc/cookbook/file-upload doc/cookbook/file-upload
doc/cookbook/generic doc/cookbook/generic
doc/cookbook/hoist-server-with-context doc/cookbook/hoist-server-with-context
@ -36,7 +36,8 @@ packages:
-- doc/cookbook/sentry -- doc/cookbook/sentry
-- Commented out because servant-quickcheck currently doesn't build. -- Commented out because servant-quickcheck currently doesn't build.
-- doc/cookbook/testing -- doc/cookbook/testing
doc/cookbook/uverb --doc/cookbook/uverb
-- ^ BROKEN servant-swagger -> optics-th
doc/cookbook/structuring-apis doc/cookbook/structuring-apis
doc/cookbook/using-custom-monad doc/cookbook/using-custom-monad
doc/cookbook/using-free-client doc/cookbook/using-free-client
@ -64,8 +65,7 @@ write-ghc-environment-files: always
allow-newer: servant-pagination-2.2.2:servant allow-newer: servant-pagination-2.2.2:servant
allow-newer: servant-pagination-2.2.2:servant-server allow-newer: servant-pagination-2.2.2:servant-server
-- https://github.com/haskell-servant/servant-multipart/pull/41
allow-newer: servant-multipart:servant
allow-newer: servant-multipart:servant-server
allow-newer: servant-multipart:servant-client-core
allow-newer: servant-js:servant allow-newer: servant-js:servant
-- ghc 9
allow-newer: tdigest:base

View File

@ -68,9 +68,9 @@ library
, cookie >= 0.4.3 && < 0.5 , cookie >= 0.4.3 && < 0.5
, js-jquery >= 3.3.1 && < 3.4 , js-jquery >= 3.3.1 && < 3.4
, lucid >= 2.9.11 && < 2.10 , lucid >= 2.9.11 && < 2.10
, random >= 1.1 && < 1.2 , random >= 1.1 && < 1.3
, servant-js >= 0.9 && < 0.10 , servant-js >= 0.9 && < 0.10
, time >= 1.6.0.1 && < 1.10 , time >= 1.6.0.1 && < 1.13
-- For legacy tools, we need to specify build-depends too -- For legacy tools, we need to specify build-depends too
build-depends: markdown-unlit >= 0.5.0 && <0.6 build-depends: markdown-unlit >= 0.5.0 && <0.6

View File

@ -16,7 +16,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com maintainer: haskell-servant-maintainers@googlegroups.com
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors
build-type: Simple build-type: Simple
tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 || ==9.0.1
, GHCJS == 8.4 , GHCJS == 8.4
extra-source-files: extra-source-files:
@ -50,13 +50,13 @@ library
-- --
-- note: mtl lower bound is so low because of GHC-7.8 -- note: mtl lower bound is so low because of GHC-7.8
build-depends: build-depends:
base >= 4.9 && < 4.15 base >= 4.9 && < 4.16
, bytestring >= 0.10.8.1 && < 0.12 , bytestring >= 0.10.8.1 && < 0.12
, containers >= 0.5.7.1 && < 0.7 , containers >= 0.5.7.1 && < 0.7
, deepseq >= 1.4.2.0 && < 1.5 , deepseq >= 1.4.2.0 && < 1.5
, text >= 1.2.3.0 && < 1.3 , text >= 1.2.3.0 && < 1.3
, transformers >= 0.5.2.0 && < 0.6 , transformers >= 0.5.2.0 && < 0.6
, template-haskell >= 2.11.1.0 && < 2.17 , template-haskell >= 2.11.1.0 && < 2.18
if !impl(ghc >= 8.2) if !impl(ghc >= 8.2)
build-depends: build-depends:

View File

@ -20,7 +20,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com maintainer: haskell-servant-maintainers@googlegroups.com
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors
build-type: Simple build-type: Simple
tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 || ==9.0.1
extra-source-files: extra-source-files:
CHANGELOG.md CHANGELOG.md
@ -40,7 +40,7 @@ library
-- Bundled with GHC: Lower bound to not force re-installs -- Bundled with GHC: Lower bound to not force re-installs
-- text and mtl are bundled starting with GHC-8.4 -- text and mtl are bundled starting with GHC-8.4
build-depends: build-depends:
base >= 4.9 && < 4.15 base >= 4.9 && < 4.16
, bytestring >= 0.10.8.1 && < 0.12 , bytestring >= 0.10.8.1 && < 0.12
, containers >= 0.5.7.1 && < 0.7 , containers >= 0.5.7.1 && < 0.7
, deepseq >= 1.4.2.0 && < 1.5 , deepseq >= 1.4.2.0 && < 1.5

View File

@ -19,7 +19,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com maintainer: haskell-servant-maintainers@googlegroups.com
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors
build-type: Simple build-type: Simple
tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 || ==9.0.1
extra-source-files: extra-source-files:
CHANGELOG.md CHANGELOG.md
@ -41,7 +41,7 @@ library
-- --
-- note: mtl lower bound is so low because of GHC-7.8 -- note: mtl lower bound is so low because of GHC-7.8
build-depends: build-depends:
base >= 4.9 && < 4.15 base >= 4.9 && < 4.16
, bytestring >= 0.10.8.1 && < 0.12 , bytestring >= 0.10.8.1 && < 0.12
, text >= 1.2.3.0 && < 1.3 , text >= 1.2.3.0 && < 1.3

View File

@ -21,7 +21,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com maintainer: haskell-servant-maintainers@googlegroups.com
copyright: 2015-2019 Servant Contributors copyright: 2015-2019 Servant Contributors
build-type: Simple build-type: Simple
tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 || ==9.0.1
extra-source-files: extra-source-files:
CHANGELOG.md CHANGELOG.md
@ -41,7 +41,7 @@ library
-- --
-- note: mtl lower bound is so low because of GHC-7.8 -- note: mtl lower bound is so low because of GHC-7.8
build-depends: build-depends:
base >= 4.9 && < 4.15 base >= 4.9 && < 4.16
, text >= 1.2.3.0 && < 1.3 , text >= 1.2.3.0 && < 1.3
-- Servant dependencies -- Servant dependencies

View File

@ -20,7 +20,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com maintainer: haskell-servant-maintainers@googlegroups.com
copyright: 2019 Servant Contributors copyright: 2019 Servant Contributors
build-type: Simple build-type: Simple
tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 || ==9.0.1
extra-source-files: extra-source-files:
CHANGELOG.md CHANGELOG.md
@ -38,7 +38,7 @@ library
-- Bundled with GHC: Lower bound to not force re-installs -- Bundled with GHC: Lower bound to not force re-installs
-- text and mtl are bundled starting with GHC-8.4 -- text and mtl are bundled starting with GHC-8.4
build-depends: build-depends:
base >= 4.9 && < 4.15 base >= 4.9 && < 4.16
, bytestring >= 0.10.8.1 && < 0.12 , bytestring >= 0.10.8.1 && < 0.12
, containers >= 0.5.7.1 && < 0.7 , containers >= 0.5.7.1 && < 0.7
, deepseq >= 1.4.2.0 && < 1.5 , deepseq >= 1.4.2.0 && < 1.5

View File

@ -64,7 +64,7 @@ server = fast :<|> slow :<|> readme :<|> proxy
readme = liftIO $ do readme = liftIO $ do
putStrLn "/readme" putStrLn "/readme"
return $ P.withFile "README.md" ReadMode PBS.fromHandle return $ P.withFile "README.md" ReadMode $ \h -> PBS.fromHandle h
proxy c = liftIO $ do proxy c = liftIO $ do
putStrLn "/proxy" putStrLn "/proxy"

View File

@ -23,7 +23,7 @@ author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com maintainer: haskell-servant-maintainers@googlegroups.com
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors
build-type: Simple build-type: Simple
tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 || ==9.0.1
extra-source-files: extra-source-files:
CHANGELOG.md CHANGELOG.md
@ -60,7 +60,7 @@ library
-- Bundled with GHC: Lower bound to not force re-installs -- Bundled with GHC: Lower bound to not force re-installs
-- text and mtl are bundled starting with GHC-8.4 -- text and mtl are bundled starting with GHC-8.4
build-depends: build-depends:
base >= 4.9 && < 4.15 base >= 4.9 && < 4.16
, bytestring >= 0.10.8.1 && < 0.12 , bytestring >= 0.10.8.1 && < 0.12
, containers >= 0.5.7.1 && < 0.7 , containers >= 0.5.7.1 && < 0.7
, mtl >= 2.2.2 && < 2.3 , mtl >= 2.2.2 && < 2.3
@ -72,7 +72,7 @@ library
-- strict dependency as we re-export 'servant' things. -- strict dependency as we re-export 'servant' things.
build-depends: build-depends:
servant >= 0.18.2 && < 0.18.3 servant >= 0.18.2 && < 0.18.3
, http-api-data >= 0.4.1 && < 0.4.3 , http-api-data >= 0.4.1 && < 0.4.4
-- Other dependencies: Lower bound around what is in the latest Stackage LTS. -- Other dependencies: Lower bound around what is in the latest Stackage LTS.
-- Here can be exceptions if we really need features from the newer versions. -- Here can be exceptions if we really need features from the newer versions.

View File

@ -1,6 +1,6 @@
cabal-version: >=1.10 cabal-version: >=1.10
name: servant name: servant
version: 0.18.2 version: 0.18.2.1
synopsis: A family of combinators for defining webservices APIs synopsis: A family of combinators for defining webservices APIs
category: Servant, Web category: Servant, Web
@ -20,7 +20,7 @@ maintainer: haskell-servant-maintainers@googlegroups.com
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors
build-type: Simple build-type: Simple
tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 || ==9.0.1
, GHCJS == 8.4 , GHCJS == 8.4
extra-source-files: extra-source-files:
@ -78,7 +78,7 @@ library
-- --
-- note: mtl lower bound is so low because of GHC-7.8 -- note: mtl lower bound is so low because of GHC-7.8
build-depends: build-depends:
base >= 4.9 && < 4.15 base >= 4.9 && < 4.16
, bytestring >= 0.10.8.1 && < 0.12 , bytestring >= 0.10.8.1 && < 0.12
, mtl >= 2.2.2 && < 2.3 , mtl >= 2.2.2 && < 2.3
, sop-core >= 0.4.0.0 && < 0.6 , sop-core >= 0.4.0.0 && < 0.6
@ -89,7 +89,7 @@ library
-- We depend (heavily) on the API of these packages: -- We depend (heavily) on the API of these packages:
-- i.e. re-export, or allow using without direct dependency -- i.e. re-export, or allow using without direct dependency
build-depends: build-depends:
http-api-data >= 0.4.1 && < 0.4.3 http-api-data >= 0.4.1 && < 0.4.4
, singleton-bool >= 0.1.4 && < 0.1.7 , singleton-bool >= 0.1.4 && < 0.1.7
-- Other dependencies: Lower bound around what is in the latest Stackage LTS. -- Other dependencies: Lower bound around what is in the latest Stackage LTS.

View File

@ -144,4 +144,4 @@ _testNubbed :: ( ( Nubbed '[Bool, Int, Int] ~ 'False
, Nubbed '[Int, Bool] ~ 'True , Nubbed '[Int, Bool] ~ 'True
) )
=> a) -> a => a) -> a
_testNubbed = id _testNubbed a = a

View File

@ -90,7 +90,7 @@ runRenderFrames :: (SourceT Identity a -> SourceT Identity LBS.ByteString) -> [a
runRenderFrames f = fmap mconcat . runExcept . runSourceT . f . source runRenderFrames f = fmap mconcat . runExcept . runSourceT . f . source
runUnrenderFrames :: (SourceT Identity b -> SourceT Identity a) -> [b] -> [Either String a] runUnrenderFrames :: (SourceT Identity b -> SourceT Identity a) -> [b] -> [Either String a]
runUnrenderFrames f = go . Effect . flip unSourceT return . f . source where runUnrenderFrames f = go . Effect . (\x -> unSourceT x return) . f . source where
go :: StepT Identity a -> [Either String a] go :: StepT Identity a -> [Either String a]
go Stop = [] go Stop = []
go (Error err) = [Left err] go (Error err) = [Left err]