on master help sign in
Test with GHC 9.0.1 and 8.10.4
d97a634Mark Karpov
.github/workflows/ci.yaml+4−4
@@ -12,19 +12,19 @@ jobs:
12 runs-on: ubuntu-latest
12 runs-on: ubuntu-latest
13 steps:
13 steps:
14 - uses: actions/checkout@v2.3.4
14 - uses: actions/checkout@v2.3.4
15− - uses: mrkkrp/ormolu-action@v1
15+ - uses: mrkkrp/ormolu-action@v2
16 build:
16 build:
17 runs-on: ubuntu-latest
17 runs-on: ubuntu-latest
18 needs: ormolu
18 needs: ormolu
19 strategy:
19 strategy:
20 matrix:
20 matrix:
21− cabal: ["3.2"]
21+ cabal: ["3.4"]
22− ghc: ["8.6.5", "8.8.4", "8.10.3"]
22+ ghc: ["8.8.4", "8.10.4", "9.0.1"]
23 env:
23 env:
24 CONFIG: "--enable-tests --enable-benchmarks --flags=dev"
24 CONFIG: "--enable-tests --enable-benchmarks --flags=dev"
25 steps:
25 steps:
26 - uses: actions/checkout@v2.3.4
26 - uses: actions/checkout@v2.3.4
27− - uses: haskell/actions/setup@v1.1.5
27+ - uses: haskell/actions/setup@v1.2
28 id: setup-haskell-cabal
28 id: setup-haskell-cabal
29 with:
29 with:
30 ghc-version: ${{ matrix.ghc }}
30 ghc-version: ${{ matrix.ghc }}
Network/HTTP/Req.hs+4−2
@@ -953,8 +953,10 @@ instance Typeable scheme => TH.Lift (Url scheme) where
953 where
953 where
954 liftText t = TH.AppE (TH.VarE 'T.pack) <$> TH.lift (T.unpack t)
954 liftText t = TH.AppE (TH.VarE 'T.pack) <$> TH.lift (T.unpack t)
955
955
956−#if MIN_VERSION_template_haskell(2,16,0)
956+#if MIN_VERSION_template_haskell(2,17,0)
957+ liftTyped = TH.Code . TH.unsafeTExpCoerce . TH.lift
958+#elif MIN_VERSION_template_haskell(2,16,0)
957− liftTyped url = TH.TExp <$> TH.lift url
959+ liftTyped = TH.unsafeTExpCoerce . TH.lift
958#endif
960#endif
959
961
960-- | Given host name, produce a 'Url' which has “http” as its scheme and
962-- | Given host name, produce a 'Url' which has “http” as its scheme and
httpbin-tests/Network/HTTP/ReqSpec.hs−5
@@ -1,4 +1,3 @@
1−{-# LANGUAGE CPP #-}
2{-# LANGUAGE DataKinds #-}
1{-# LANGUAGE DataKinds #-}
3{-# LANGUAGE FlexibleInstances #-}
2{-# LANGUAGE FlexibleInstances #-}
4{-# LANGUAGE OverloadedStrings #-}
3{-# LANGUAGE OverloadedStrings #-}
@@ -27,10 +26,6 @@ import qualified Network.HTTP.Types as Y
27import Test.Hspec
26import Test.Hspec
28import Test.QuickCheck
27import Test.QuickCheck
29
28
30−#if !MIN_VERSION_base(4,13,0)
31−import Data.Semigroup ((<>))
32−#endif
33−
34spec :: Spec
29spec :: Spec
35spec = do
30spec = do
36 describe "exception throwing on non-2xx status codes" $
31 describe "exception throwing on non-2xx status codes" $
pure-tests/Network/HTTP/ReqSpec.hs−9
@@ -1,4 +1,3 @@
1−{-# LANGUAGE CPP #-}
2{-# LANGUAGE DataKinds #-}
1{-# LANGUAGE DataKinds #-}
3{-# LANGUAGE DeriveGeneric #-}
2{-# LANGUAGE DeriveGeneric #-}
4{-# LANGUAGE FlexibleInstances #-}
3{-# LANGUAGE FlexibleInstances #-}
@@ -48,10 +47,6 @@ import Text.URI (URI)
48import qualified Text.URI as URI
47import qualified Text.URI as URI
49import qualified Text.URI.QQ as QQ
48import qualified Text.URI.QQ as QQ
50
49
51−#if !MIN_VERSION_base(4,13,0)
52−import Data.Semigroup ((<>))
53−#endif
54−
55spec :: Spec
50spec :: Spec
56spec = do
51spec = do
57 describe "config" $
52 describe "config" $
@@ -266,11 +261,7 @@ spec = do
266 it "cookie jar is set without modifications" $
261 it "cookie jar is set without modifications" $
267 property $ \cjar -> do
262 property $ \cjar -> do
268 request <- req_ GET url NoReqBody (cookieJar cjar)
263 request <- req_ GET url NoReqBody (cookieJar cjar)
269−#if MIN_VERSION_http_client(0,7,0)
270 L.cookieJar request `shouldSatisfy` (maybe False (L.equalCookieJar cjar))
264 L.cookieJar request `shouldSatisfy` (maybe False (L.equalCookieJar cjar))
271−#else
272− L.cookieJar request `shouldBe` Just cjar
273−#endif
274 describe "basicAuth" $ do
265 describe "basicAuth" $ do
275 it "sets Authorization header to correct value" $
266 it "sets Authorization header to correct value" $
276 property $ \username password -> do
267 property $ \username password -> do
req.cabal+9−9
@@ -5,7 +5,7 @@ license: BSD3
5license-file: LICENSE.md
5license-file: LICENSE.md
6maintainer: Mark Karpov <markkarpov92@gmail.com>
6maintainer: Mark Karpov <markkarpov92@gmail.com>
7author: Mark Karpov <markkarpov92@gmail.com>
7author: Mark Karpov <markkarpov92@gmail.com>
8−tested-with: ghc ==8.6.5 ghc ==8.8.4 ghc ==8.10.3
8+tested-with: ghc ==8.8.4 ghc ==8.10.4 ghc ==9.0.1
9homepage: https://github.com/mrkkrp/req
9homepage: https://github.com/mrkkrp/req
10bug-reports: https://github.com/mrkkrp/req/issues
10bug-reports: https://github.com/mrkkrp/req/issues
11synopsis: HTTP client library
11synopsis: HTTP client library
@@ -35,21 +35,21 @@ library
35 build-depends:
35 build-depends:
36 aeson >=0.9 && <1.6,
36 aeson >=0.9 && <1.6,
37 authenticate-oauth >=1.5 && <1.7,
37 authenticate-oauth >=1.5 && <1.7,
38− base >=4.12 && <5.0,
38+ base >=4.13 && <5.0,
39 blaze-builder >=0.3 && <0.5,
39 blaze-builder >=0.3 && <0.5,
40 bytestring >=0.10.8 && <0.12,
40 bytestring >=0.10.8 && <0.12,
41 case-insensitive >=0.2 && <1.3,
41 case-insensitive >=0.2 && <1.3,
42 connection >=0.2.2 && <0.4,
42 connection >=0.2.2 && <0.4,
43 exceptions >=0.6 && <0.11,
43 exceptions >=0.6 && <0.11,
44 http-api-data >=0.2 && <0.5,
44 http-api-data >=0.2 && <0.5,
45− http-client >=0.5 && <0.8,
45+ http-client >=0.7 && <0.8,
46 http-client-tls >=0.3.2 && <0.4,
46 http-client-tls >=0.3.2 && <0.4,
47 http-types >=0.8 && <10.0,
47 http-types >=0.8 && <10.0,
48 modern-uri >=0.3 && <0.4,
48 modern-uri >=0.3 && <0.4,
49 monad-control >=1.0 && <1.1,
49 monad-control >=1.0 && <1.1,
50 mtl >=2.0 && <3.0,
50 mtl >=2.0 && <3.0,
51 retry >=0.8 && <0.9,
51 retry >=0.8 && <0.9,
52− template-haskell >=2.14 && <2.17,
52+ template-haskell >=2.14 && <2.18,
53 text >=0.2 && <1.3,
53 text >=0.2 && <1.3,
54 time >=1.2 && <1.10,
54 time >=1.2 && <1.10,
55 transformers >=0.4 && <0.6,
55 transformers >=0.4 && <0.6,
@@ -77,19 +77,19 @@ test-suite pure-tests
77 build-depends:
77 build-depends:
78 QuickCheck >=2.7 && <3.0,
78 QuickCheck >=2.7 && <3.0,
79 aeson >=0.9 && <1.6,
79 aeson >=0.9 && <1.6,
80− base >=4.12 && <5.0,
80+ base >=4.13 && <5.0,
81 blaze-builder >=0.3 && <0.5,
81 blaze-builder >=0.3 && <0.5,
82 bytestring >=0.10.8 && <0.12,
82 bytestring >=0.10.8 && <0.12,
83 case-insensitive >=0.2 && <1.3,
83 case-insensitive >=0.2 && <1.3,
84 hspec >=2.0 && <3.0,
84 hspec >=2.0 && <3.0,
85 hspec-core >=2.0 && <3.0,
85 hspec-core >=2.0 && <3.0,
86− http-client >=0.5 && <0.8,
86+ http-client >=0.7 && <0.8,
87 http-types >=0.8 && <10.0,
87 http-types >=0.8 && <10.0,
88 modern-uri >=0.3 && <0.4,
88 modern-uri >=0.3 && <0.4,
89 mtl >=2.0 && <3.0,
89 mtl >=2.0 && <3.0,
90 req,
90 req,
91 retry >=0.8 && <0.9,
91 retry >=0.8 && <0.9,
92− template-haskell >=2.14 && <2.17,
92+ template-haskell >=2.14 && <2.18,
93 text >=0.2 && <1.3,
93 text >=0.2 && <1.3,
94 time >=1.2 && <1.10
94 time >=1.2 && <1.10
95
95
@@ -109,10 +109,10 @@ test-suite httpbin-tests
109 build-depends:
109 build-depends:
110 QuickCheck >=2.7 && <3.0,
110 QuickCheck >=2.7 && <3.0,
111 aeson >=0.9 && <1.6,
111 aeson >=0.9 && <1.6,
112− base >=4.12 && <5.0,
112+ base >=4.13 && <5.0,
113 bytestring >=0.10.8 && <0.12,
113 bytestring >=0.10.8 && <0.12,
114 hspec >=2.0 && <3.0,
114 hspec >=2.0 && <3.0,
115− http-client >=0.5 && <0.8,
115+ http-client >=0.7 && <0.8,
116 http-types >=0.8 && <10.0,
116 http-types >=0.8 && <10.0,
117 monad-control >=1.0 && <1.1,
117 monad-control >=1.0 && <1.1,
118 mtl >=2.0 && <3.0,
118 mtl >=2.0 && <3.0,