From 4d46e98419fa1ce69cdf8a689460c558a3879bdf Mon Sep 17 00:00:00 2001 From: Sasa Bogicevic Date: Fri, 27 Apr 2018 11:03:37 +0200 Subject: [PATCH] Remove hardcoded param in serveWithContext --- servant-server/src/Servant/Server.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/servant-server/src/Servant/Server.hs b/servant-server/src/Servant/Server.hs index 350606b9..c5c4e1fe 100644 --- a/servant-server/src/Servant/Server.hs +++ b/servant-server/src/Servant/Server.hs @@ -126,11 +126,12 @@ import Servant.Server.Internal serve :: (HasServer api '[Bool]) => Proxy api -> Server api -> Application serve p = serveWithContext p (False :. EmptyContext) -serveWithContext :: (HasServer api context) +serveWithContext :: (HasServer api context, HasContextEntry context Bool) => Proxy api -> Context context -> Server api -> Application serveWithContext p context server = toApplication - False -- determins if we should fully evaluate response + (getContextEntry context :: Bool) + -- ^ determins if we should fully evaluate response (runRouter (route p context (emptyDelayed (Route server)))) -- | Hoist server implementation.