Remove hardcoded param in serveWithContext
This commit is contained in:
parent
a90b671607
commit
4d46e98419
1 changed files with 3 additions and 2 deletions
|
@ -126,11 +126,12 @@ import Servant.Server.Internal
|
||||||
serve :: (HasServer api '[Bool]) => Proxy api -> Server api -> Application
|
serve :: (HasServer api '[Bool]) => Proxy api -> Server api -> Application
|
||||||
serve p = serveWithContext p (False :. EmptyContext)
|
serve p = serveWithContext p (False :. EmptyContext)
|
||||||
|
|
||||||
serveWithContext :: (HasServer api context)
|
serveWithContext :: (HasServer api context, HasContextEntry context Bool)
|
||||||
=> Proxy api -> Context context -> Server api -> Application
|
=> Proxy api -> Context context -> Server api -> Application
|
||||||
serveWithContext p context server =
|
serveWithContext p context server =
|
||||||
toApplication
|
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))))
|
(runRouter (route p context (emptyDelayed (Route server))))
|
||||||
|
|
||||||
-- | Hoist server implementation.
|
-- | Hoist server implementation.
|
||||||
|
|
Loading…
Reference in a new issue