为什么warp不调用WaiApp有原因吗?

时间:2019-05-09 19:54:35

标签: haskell yesod

仅出于此目的,我对为何warp不按评论中的说明调用toWaiApp感兴趣:

toWaiApp :: YesodDispatch site => site -> IO W.Application
toWaiApp site = do
    logger <- makeLogger site
    toWaiAppLogger logger site


-- | [...] Automatically calls 'toWaiApp'. [...]
warp :: YesodDispatch site => Int -> site -> IO ()
warp port site = do
    logger <- makeLogger site
    toWaiAppLogger logger site >>= Network.Wai.Handler.Warp.runSettings (...)

为什么不打电话给toWaiApp

-- | [...] Automatically calls 'toWaiApp'. [...]
warp :: YesodDispatch site => Int -> site -> IO ()
warp port site = toWaiApp site >>= Network.Wai.Handler.Warp.runSettings (...)

更新:我在yesod-core-1.6.14上。

0 个答案:

没有答案