I think you are only missing a do
:
rssFeed :: Snap ()
rssFeed = do
feed <- parseFeedString "https://news.ycombinator.com/rss"
putStrLn (ppTopElement $ xmlFeed feed)
because the <-
comes from do-notation
.
I don't know how the Snap
monad looks, but I guess you might need a liftIO
for the putStrLn
:
liftIO $ putStrLn (ppTopElement $ xmlFeed feed)