Merge pull request #32 from adinapoli-iohk/support-servant-0.11

Tentatively support Servant 0.11
This commit is contained in:
Julian Arni 2017-10-19 10:11:40 -07:00 committed by GitHub
commit 4765664a3e
6 changed files with 23 additions and 4 deletions

View File

@ -6,6 +6,7 @@ env:
- STACK_YAML=stack.yaml
- STACK_YAML=stack-lts-7.yaml
- STACK_YAML=stack-lts-6.yaml
- STACK_YAML=stack-lts-9.yaml
addons:

View File

@ -2,6 +2,15 @@ upcoming:
releases:
- version: "0.0.3.1"
changes:
- description: Support for Servant 0.11
issue: none
pr: 32
authors: adinapoli-iohk
date: 2017-10-18
- version: "0.0.3.0"
changes:

View File

@ -46,9 +46,9 @@ library
, pretty == 1.1.*
, process >= 1.2 && < 1.5
, QuickCheck > 2.7 && < 2.11
, servant > 0.6 && < 0.10
, servant-client > 0.6 && < 0.10
, servant-server > 0.6 && < 0.10
, servant > 0.6 && < 0.12
, servant-client > 0.6 && < 0.12
, servant-server > 0.6 && < 0.12
, split == 0.2.*
, string-conversions > 0.3 && < 0.5
, temporary == 1.2.*

View File

@ -64,6 +64,10 @@ instance (KnownSymbol path, HasGenRequest b) => HasGenRequest (path :> b) where
(oldf, old) = genRequest (Proxy :: Proxy b)
new = cs $ symbolVal (Proxy :: Proxy path)
#if MIN_VERSION_servant(0,11,0)
instance HasGenRequest EmptyAPI where
genRequest _ = (0, error "EmptyAPIs cannot be queried.")
#endif
instance (Arbitrary c, HasGenRequest b, ToHttpApiData c )
=> HasGenRequest (Capture x c :> b) where

6
stack-lts-9.yaml Normal file
View File

@ -0,0 +1,6 @@
resolver: lts-9.1
packages:
- '.'
extra-deps: []
flags: {}
extra-package-dbs: []

View File

@ -38,7 +38,6 @@ import Servant.QuickCheck
import Servant.QuickCheck.Internal (genRequest, runGenRequest,
serverDoesntSatisfy)
spec :: Spec
spec = do
serversEqualSpec