about summary refs log tree commit diff
path: root/src/RSS.hs
diff options
context:
space:
mode:
author"Vincent Ambo ext:(%22) <tazjin@gmail.com>2013-04-28T12·44+0200
committer"Vincent Ambo ext:(%22) <tazjin@gmail.com>2013-04-28T12·44+0200
commitc5206173e6445507f8468457ac5534065e8b9909 (patch)
tree6bb9cc9f00b04c0037eb984208b108804bdfdb93 /src/RSS.hs
parent9719b5a62de0795a5cb62778de06c3aa7f206e95 (diff)
ran hlint
Diffstat (limited to 'src/RSS.hs')
-rw-r--r--src/RSS.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/RSS.hs b/src/RSS.hs
index 50531c3f8065..045702ece443 100644
--- a/src/RSS.hs
+++ b/src/RSS.hs
@@ -2,14 +2,15 @@
 
 module RSS (renderFeed) where
 
-import qualified Data.Text   as T
+import qualified Data.Text     as T
 
-import           Data.Maybe  (fromMaybe)
-import           Data.Time   (UTCTime, getCurrentTime)
+import           Control.Monad (liftM)
+import           Data.Maybe    (fromMaybe)
+import           Data.Time     (UTCTime, getCurrentTime)
 import           Network.URI
 import           Text.RSS
 
-import           BlogDB      hiding (Title)
+import           BlogDB        hiding (Title)
 import           Locales
 
 createChannel :: BlogLang -> UTCTime -> [ChannelElem]
@@ -20,7 +21,7 @@ createChannel l  now = [ Language $ show l
                        ]
 
 createRSS :: BlogLang -> UTCTime -> [Item] -> RSS
-createRSS l t i = RSS (rssTitle l) (rssLink l) (rssDesc l) (createChannel l t) i
+createRSS l t = RSS (rssTitle l) (rssLink l) (rssDesc l) (createChannel l t)
 
 createItem :: Entry -> Item
 createItem Entry{..} = [ Title $ T.unpack title
@@ -39,4 +40,4 @@ createFeed :: BlogLang -> [Entry] -> IO RSS
 createFeed l e = getCurrentTime >>= (\t -> return $ createRSS l t $ createItems e )
 
 renderFeed :: BlogLang -> [Entry] -> IO String
-renderFeed l e = createFeed l e >>= (\feed -> return $ showXML $ rssToXML feed)
+renderFeed l e = liftM (showXML . rssToXML) (createFeed l e)