@@ -1,7 +1,7 @@
1{-# LANGUAGE OverloadedStrings #-}
1{-# LANGUAGE OverloadedStrings #-}
2module Main where
2module Main where
4−import Blaze.ByteString.Builder.Char.Utf8 (fromString)
4+import Data.ByteString.Builder (string8)
5import Control.Concurrent (forkIO, threadDelay)
5import Control.Concurrent (forkIO, threadDelay)
6import Control.Concurrent.Chan
6import Control.Concurrent.Chan
7import Control.Monad
7import Control.Monad
@@ -27,15 +27,15 @@ eventChan :: Chan ServerEvent -> IO ()
27eventChan chan = forever $ do
27eventChan chan = forever $ do
28 threadDelay 1000000
28 threadDelay 1000000
29 time <- getPOSIXTime
29 time <- getPOSIXTime
30− writeChan chan (ServerEvent Nothing Nothing [fromString . show $ time])
30+ writeChan chan (ServerEvent Nothing Nothing [string8 . show $ time])
32eventIO :: IO ServerEvent
32eventIO :: IO ServerEvent
33eventIO = do
33eventIO = do
34 threadDelay 1000000
34 threadDelay 1000000
35 time <- getPOSIXTime
35 time <- getPOSIXTime
36− return $ ServerEvent (Just $ fromString "io")
36+ return $ ServerEvent (Just $ string8 "io")
38− [fromString . show $ time]
38+ [string8 . show $ time]
40main :: IO ()
40main :: IO ()