IO String issue

t|f 2018-04-29 04:16:50.505061 UTC

1{-# LANGUAGE QuasiQuotes #-}
2{-# LANGUAGE OverloadedStrings #-}
3import Text.Hamlet (HtmlUrl, Render, Html, hamlet)
4import Text.Blaze.Html.Renderer.String (renderHtml)
5import Data.Text (Text)
6import Data.Time.Clock
7import Data.Time.Calendar
8import Text.Blaze
9
10currentYear :: IO String
11currentYear = do
12 now <- getCurrentTime
13 let (year, _, _) = toGregorian $ utctDay now
14 return $ show year
15
16
17main = do
18 putStrLn currentYear