Skip to content

Commit 4d46e98

Browse files
author
Sasa Bogicevic
committed
Remove hardcoded param in serveWithContext
1 parent a90b671 commit 4d46e98

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

servant-server/src/Servant/Server.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,12 @@ import Servant.Server.Internal
126126
serve :: (HasServer api '[Bool]) => Proxy api -> Server api -> Application
127127
serve p = serveWithContext p (False :. EmptyContext)
128128

129-
serveWithContext :: (HasServer api context)
129+
serveWithContext :: (HasServer api context, HasContextEntry context Bool)
130130
=> Proxy api -> Context context -> Server api -> Application
131131
serveWithContext p context server =
132132
toApplication
133-
False -- determins if we should fully evaluate response
133+
(getContextEntry context :: Bool)
134+
-- ^ determins if we should fully evaluate response
134135
(runRouter (route p context (emptyDelayed (Route server))))
135136

136137
-- | Hoist server implementation.

0 commit comments

Comments
 (0)