Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test with 3 latest versions of GHC, update Ormolu #125

Merged
merged 1 commit into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
cabal: ["3.6"]
ghc: ["8.8.4", "8.10.7", "9.0.2"]
ghc: ["8.10.7", "9.0.2", "9.2.1"]
env:
CONFIG: "--enable-tests --enable-benchmarks --flags=dev"
steps:
Expand Down
2 changes: 1 addition & 1 deletion Network/HTTP/Req.hs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ import Data.List.NonEmpty (NonEmpty (..))
import qualified Data.List.NonEmpty as NE
import Data.Maybe (fromMaybe)
import Data.Proxy
import Data.Semigroup hiding (Option, option)
import Data.Semigroup (Endo (..))
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
Expand Down
3 changes: 2 additions & 1 deletion httpbin-tests/Network/HTTP/ReqSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import qualified Data.Aeson.KeyMap as Aeson.KeyMap
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import Data.Functor.Identity (runIdentity)
import Data.Maybe (fromJust)
import Data.Proxy
import Data.Text (Text)
import qualified Data.Text as T
Expand Down Expand Up @@ -135,7 +136,7 @@ spec = do
LM.partBS "bar" "bar data!"
]
r <- req POST (httpbin /: "post") body jsonResponse mempty
let Just contentType = getRequestContentType body
let contentType = fromJust (getRequestContentType body)
(stripFunnyHeaders . stripOrigin) (responseBody r)
`shouldBe` object
[ "args" .= emptyObject,
Expand Down
10 changes: 6 additions & 4 deletions pure-tests/Network/HTTP/ReqSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,13 @@ spec = do
let uriHttp = uri' {URI.uriScheme = Just [QQ.scheme|http|]}
uriHttps = uri' {URI.uriScheme = Just [QQ.scheme|https|]}
requestHttp <-
let Left (url', options) = fromJust (useURI uriHttp)
in req_ GET url' NoReqBody options
case fromJust (useURI uriHttp) of
Left (url', options) -> req_ GET url' NoReqBody options
_ -> error "(useURI uriHttp) should have returned Left"
requestHttps <-
let Right (url', options) = fromJust (useURI uriHttps)
in req_ GET url' NoReqBody options
case fromJust (useURI uriHttps) of
Right (url', options) -> req_ GET url' NoReqBody options
_ -> error "(useURI uriHttps) should have returned Right"
L.host requestHttp `shouldBe` uriHost uriHttp
L.host requestHttps `shouldBe` uriHost uriHttps
L.port requestHttp `shouldBe` uriPort 80 uriHttp
Expand Down
6 changes: 3 additions & 3 deletions req.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ license: BSD-3-Clause
license-file: LICENSE.md
maintainer: Mark Karpov <[email protected]>
author: Mark Karpov <[email protected]>
tested-with: ghc ==8.8.4 ghc ==8.10.7 ghc ==9.0.2
tested-with: ghc ==8.10.7 ghc ==9.0.2 ghc ==9.2.1
homepage: https://github.com/mrkkrp/req
bug-reports: https://github.com/mrkkrp/req/issues
synopsis: HTTP client library
Expand Down Expand Up @@ -49,7 +49,7 @@ library
monad-control >=1.0 && <1.1,
mtl >=2.0 && <3.0,
retry >=0.8 && <0.10,
template-haskell >=2.14 && <2.18,
template-haskell >=2.14 && <2.19,
text >=0.2 && <1.3,
time >=1.2 && <1.13,
transformers >=0.5.3.0 && <0.6,
Expand Down Expand Up @@ -89,7 +89,7 @@ test-suite pure-tests
mtl >=2.0 && <3.0,
req,
retry >=0.8 && <0.10,
template-haskell >=2.14 && <2.18,
template-haskell >=2.14 && <2.19,
text >=0.2 && <1.3,
time >=1.2 && <1.13

Expand Down