Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

Commit

Permalink
GHC 8.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Sep 2, 2020
1 parent fdf20a9 commit ffebcf3
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 24 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,12 @@ jobs:
- "8.4"
- "8.6"
- "8.8"
# TODO - "8.10"
- "8.10"
exclude:
- os: macOS-latest
ghc: 8.8.3
- os: macOS-latest
ghc: 8.6.5
- os: windows-latest
ghc: 8.8.3
- os: windows-latest
ghc: 8.6.5

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -67,13 +63,13 @@ jobs:
strategy:
matrix:
stack: ["2.3.1"]
ghc: ["8.6.5"]
ghc: ["8.10.2"]

steps:
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'

- uses: actions/setup-haskell@v1.1
- uses: bubba/setup-haskell@2215b2c
name: Setup Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
Expand Down
8 changes: 4 additions & 4 deletions servant-auth-client/servant-auth-client.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ library
, bytestring >= 0.10.6.0 && < 0.11
, containers >= 0.5.6.2 && < 0.7
, servant-auth == 0.3.*
, servant >= 0.13 && < 0.18
, servant-client-core >= 0.13 && < 0.18
, servant >= 0.13 && < 0.19
, servant-client-core >= 0.13 && < 0.19

exposed-modules:
Servant.Auth.Client
Expand Down Expand Up @@ -64,12 +64,12 @@ test-suite spec
build-depends:
hspec >= 2.5.5 && < 2.8
, QuickCheck >= 2.11.3 && < 2.14
, aeson >= 1.3.1.1 && < 1.5
, aeson >= 1.3.1.1 && < 1.6
, bytestring >= 0.10.6.0 && < 0.11
, http-client >= 0.5.13.1 && < 0.7
, http-types >= 0.12.2 && < 0.13
, servant-auth-server >= 0.4.2.0 && < 0.5
, servant-server >= 0.13 && < 0.18
, servant-server >= 0.13 && < 0.19
, time >= 1.5.0.1 && < 1.10
, transformers >= 0.4.2.0 && < 0.6
, wai >= 3.2.1.2 && < 3.3
Expand Down
4 changes: 2 additions & 2 deletions servant-auth-docs/servant-auth-docs.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ library
build-depends:
base >= 4.10 && < 4.15
, servant-docs >= 0.11.2 && < 0.12
, servant >= 0.13 && < 0.18
, servant >= 0.13 && < 0.19
, servant-auth == 0.3.*
, lens >= 4.16.1 && <4.19
, lens >= 4.16.1 && <4.20
exposed-modules:
Servant.Auth.Docs
default-language: Haskell2010
Expand Down
6 changes: 3 additions & 3 deletions servant-auth-server/servant-auth-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ library
, entropy >= 0.4.1.3 && < 0.5
, http-types >= 0.12.2 && < 0.13
, jose >= 0.7.0.0 && < 0.9
, lens >= 4.16.1 && < 4.19
, lens >= 4.16.1 && < 4.20
, memory >= 0.14.16 && < 0.16
, monad-time >= 0.3.1.0 && < 0.4
, mtl >= 2.2.2 && < 2.3
, servant >= 0.13 && < 0.18
, servant >= 0.13 && < 0.19
, servant-auth == 0.3.*
, servant-server >= 0.13 && < 0.18
, servant-server >= 0.13 && < 0.19
, tagged >= 0.8.4 && < 0.9
, text >= 1.2.3.0 && < 1.3
, time >= 1.5.0.1 && < 1.10
Expand Down
6 changes: 3 additions & 3 deletions servant-auth-swagger/servant-auth-swagger.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ library
base >= 4.10 && < 4.15
, text >= 1.2.3.0 && < 1.3
, servant-swagger >= 1.1.5 && < 1.8
, swagger2 >= 2.2.2 && < 2.5
, servant >= 0.13 && < 0.18
, swagger2 >= 2.2.2 && < 2.7
, servant >= 0.13 && < 0.19
, servant-auth == 0.3.*
, lens >= 4.16.1 && < 4.19
, lens >= 4.16.1 && < 4.20
exposed-modules:
Servant.Auth.Swagger
default-language: Haskell2010
Expand Down
11 changes: 9 additions & 2 deletions servant-auth-swagger/src/Servant/Auth/Swagger.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
module Servant.Auth.Swagger
(
-- | The purpose of this package is provide the instance for 'servant-auth'
Expand All @@ -18,7 +19,7 @@ module Servant.Auth.Swagger
import Control.Lens ((&), (<>~))
import Data.Proxy (Proxy (Proxy))
import Data.Swagger (ApiKeyLocation (..), ApiKeyParams (..),
SecurityRequirement (..), SecurityScheme (..),
SecurityRequirement (..), SecurityScheme (..), SecurityDefinitions(..),
SecuritySchemeType (..), allOperations, security,
securityDefinitions)
import GHC.Exts (fromList)
Expand All @@ -31,11 +32,17 @@ import qualified Data.Text as T
instance (AllHasSecurity xs, HasSwagger api) => HasSwagger (Auth xs r :> api) where
toSwagger _
= toSwagger (Proxy :: Proxy api)
& securityDefinitions <>~ fromList secs
& securityDefinitions <>~ mkSec (fromList secs)
& allOperations.security <>~ secReqs
where
secs = securities (Proxy :: Proxy xs)
secReqs = [ SecurityRequirement (fromList [(s,[])]) | (s,_) <- secs]
mkSec =
#if MIN_VERSION_swagger2(2,6,0)
SecurityDefinitions
#else
id
#endif


class HasSecurity x where
Expand Down
4 changes: 2 additions & 2 deletions servant-auth/servant-auth.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ library
base >= 4.10 && < 4.15
, aeson >= 1.3.1.1 && < 1.6
, jose >= 0.7.0.0 && < 0.9
, lens >= 4.16.1 && < 4.19
, servant >= 0.15 && < 0.18
, lens >= 4.16.1 && < 4.20
, servant >= 0.15 && < 0.19
, text >= 1.2.3.0 && < 1.3
, unordered-containers >= 0.2.9.0 && < 0.3
exposed-modules:
Expand Down
9 changes: 8 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
resolver: lts-14.4
resolver: nightly-2020-08-31
packages:
- servant-auth
- servant-auth-server
- servant-auth-client
- servant-auth-docs
- servant-auth-swagger
extra-deps:
- servant-client-core-0.18
- servant-server-0.18
- servant-client-0.18
- servant-swagger-1.1.10
- servant-docs-0.11.6
- base64-bytestring-1.0.0.3

0 comments on commit ffebcf3

Please sign in to comment.