我想要这样的东西
{-# LANGUAGE OverloadedStrings #-}
import Control.Concurrent (threadDelay)
import Control.Monad.IO.Class
import Snap.Core
import Snap.Http.Server
main :: IO ()
main = quickHttpServe site
site :: Snap ()
site = do
writeBS "testing\n"
liftIO $ threadDelay (1000 * 1000 * 5)
writeBS "one two three"
除了我想在写testing\n
后立即刷新回复。应该很简单,但我的谷歌搜索技能让我失望。