Tentatively support Servant 0.11

This commit is contained in:
Alfredo Di Napoli 2017-10-18 14:36:45 +02:00
parent 9ebfe9d630
commit b0febe7c58
No known key found for this signature in database
GPG Key ID: 3DE3ED8B6B3559B3
4 changed files with 13 additions and 4 deletions

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