on master help sign in
adjust wai-extra example program
commitb2274a566d2e1110371cb7a88237587fbca6bfe7 authorMichael Karg <mgoremeier@gmail.com> dateMon 12 Mar 2018, 16:44 (9 years ago) parentb7bf7c9
1 file changed+4−4
wai-extra/example/Main.hs+4−4
wai-extra/example/Main.hs+4−4
@@ -1,7 +1,7 @@
11{-# LANGUAGE OverloadedStrings #-}
22module Main where
33
4−import Blaze.ByteString.Builder.Char.Utf8 (fromString)
4+import Data.ByteString.Builder (string8)
55import Control.Concurrent (forkIO, threadDelay)
66import Control.Concurrent.Chan
77import Control.Monad
@@ -27,15 +27,15 @@ eventChan :: Chan ServerEvent -> IO ()
2727eventChan chan = forever $ do
2828 threadDelay 1000000
2929 time <- getPOSIXTime
30− writeChan chan (ServerEvent Nothing Nothing [fromString . show $ time])
30+ writeChan chan (ServerEvent Nothing Nothing [string8 . show $ time])
3131
3232eventIO :: IO ServerEvent
3333eventIO = do
3434 threadDelay 1000000
3535 time <- getPOSIXTime
36− return $ ServerEvent (Just $ fromString "io")
36+ return $ ServerEvent (Just $ string8 "io")
3737 Nothing
38− [fromString . show $ time]
38+ [string8 . show $ time]
3939
4040main :: IO ()
4141main = do