Update src/Servant/QuickCheck/Internal/QuickCheck.hs

Co-authored-by: fisx <mf@zerobuzz.net>
This commit is contained in:
Maxim Koltsov 2020-07-31 10:43:19 +03:00 committed by GitHub
parent e1a919127a
commit 7cc95a8120
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,11 +42,10 @@ withServantServer api = withServantServerAndContext api EmptyContext
-- /Since 0.0.0.0/ -- /Since 0.0.0.0/
#if MIN_VERSION_servant_server(0,18,0) #if MIN_VERSION_servant_server(0,18,0)
withServantServerAndContext :: (HasServer a ctx, HasContextEntry (ctx .++ DefaultErrorFormatters) ErrorFormatters) withServantServerAndContext :: (HasServer a ctx, HasContextEntry (ctx .++ DefaultErrorFormatters) ErrorFormatters)
=> Proxy a -> Context ctx -> IO (Server a) -> (BaseUrl -> IO r) -> IO r
#else #else
withServantServerAndContext :: HasServer a ctx withServantServerAndContext :: HasServer a ctx
=> Proxy a -> Context ctx -> IO (Server a) -> (BaseUrl -> IO r) -> IO r
#endif #endif
=> Proxy a -> Context ctx -> IO (Server a) -> (BaseUrl -> IO r) -> IO r
withServantServerAndContext api ctx server t withServantServerAndContext api ctx server t
= withApplication (return . serveWithContext api ctx =<< server) $ \port -> = withApplication (return . serveWithContext api ctx =<< server) $ \port ->
t (BaseUrl Http "localhost" port "") t (BaseUrl Http "localhost" port "")