From 7cc95a81202d4c84751a9e8f5dd5a3c3a1a1d7cc Mon Sep 17 00:00:00 2001 From: Maxim Koltsov Date: Fri, 31 Jul 2020 10:43:19 +0300 Subject: [PATCH] Update src/Servant/QuickCheck/Internal/QuickCheck.hs Co-authored-by: fisx --- src/Servant/QuickCheck/Internal/QuickCheck.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Servant/QuickCheck/Internal/QuickCheck.hs b/src/Servant/QuickCheck/Internal/QuickCheck.hs index 6b2a952..2f3e0c0 100644 --- a/src/Servant/QuickCheck/Internal/QuickCheck.hs +++ b/src/Servant/QuickCheck/Internal/QuickCheck.hs @@ -42,11 +42,10 @@ withServantServer api = withServantServerAndContext api EmptyContext -- /Since 0.0.0.0/ #if MIN_VERSION_servant_server(0,18,0) withServantServerAndContext :: (HasServer a ctx, HasContextEntry (ctx .++ DefaultErrorFormatters) ErrorFormatters) - => Proxy a -> Context ctx -> IO (Server a) -> (BaseUrl -> IO r) -> IO r #else withServantServerAndContext :: HasServer a ctx - => Proxy a -> Context ctx -> IO (Server a) -> (BaseUrl -> IO r) -> IO r #endif + => Proxy a -> Context ctx -> IO (Server a) -> (BaseUrl -> IO r) -> IO r withServantServerAndContext api ctx server t = withApplication (return . serveWithContext api ctx =<< server) $ \port -> t (BaseUrl Http "localhost" port "")