From e1a33248b0d301b30eb6d96ca10ac8c80e4c48f9 Mon Sep 17 00:00:00 2001 From: Steve Hart Date: Mon, 7 Jan 2019 20:12:12 -0500 Subject: [PATCH] Eliminate deprecation warnings when building websockets sample.hs --- yesod-websockets/sample.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yesod-websockets/sample.hs b/yesod-websockets/sample.hs index 12e32ace..f2bb9505 100644 --- a/yesod-websockets/sample.hs +++ b/yesod-websockets/sample.hs @@ -16,7 +16,7 @@ mkYesod "App" [parseRoutes| / HomeR GET |] -timeSource :: MonadIO m => Source m TL.Text +timeSource :: MonadIO m => ConduitT () TL.Text m () timeSource = forever $ do now <- liftIO getCurrentTime yield $ TL.pack $ show now @@ -25,8 +25,8 @@ timeSource = forever $ do getHomeR :: Handler Html getHomeR = do webSockets $ race_ - (sourceWS $$ Data.Conduit.List.map TL.toUpper =$ sinkWSText) - (timeSource $$ sinkWSText) + (runConduit (sourceWS .| Data.Conduit.List.map TL.toUpper .| sinkWSText)) + (runConduit (timeSource .| sinkWSText)) defaultLayout $ toWidget [julius|