From b2274a566d2e1110371cb7a88237587fbca6bfe7 Mon Sep 17 00:00:00 2001 From: Michael Karg Date: Mon, 12 Mar 2018 16:44:48 +0100 Subject: [PATCH] adjust wai-extra example program --- wai-extra/example/Main.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wai-extra/example/Main.hs b/wai-extra/example/Main.hs index 685ec937..9580f56b 100644 --- a/wai-extra/example/Main.hs +++ b/wai-extra/example/Main.hs @@ -1,7 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} module Main where -import Blaze.ByteString.Builder.Char.Utf8 (fromString) +import Data.ByteString.Builder (string8) import Control.Concurrent (forkIO, threadDelay) import Control.Concurrent.Chan import Control.Monad @@ -27,15 +27,15 @@ eventChan :: Chan ServerEvent -> IO () eventChan chan = forever $ do threadDelay 1000000 time <- getPOSIXTime - writeChan chan (ServerEvent Nothing Nothing [fromString . show $ time]) + writeChan chan (ServerEvent Nothing Nothing [string8 . show $ time]) eventIO :: IO ServerEvent eventIO = do threadDelay 1000000 time <- getPOSIXTime - return $ ServerEvent (Just $ fromString "io") + return $ ServerEvent (Just $ string8 "io") Nothing - [fromString . show $ time] + [string8 . show $ time] main :: IO () main = do