Skip to content

Commit

Permalink
Eliminate deprecation warnings when building websockets sample.hs
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehartdata committed Jan 8, 2019
1 parent c5268e3 commit e1a3324
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions yesod-websockets/sample.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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|
Expand Down

0 comments on commit e1a3324

Please sign in to comment.