関数を使ってみる。あと、日付の整形を formatCalendarTime 関数に置換。
module Main where
import Time
import Locale
today :: IO CalendarTime
today = getClockTime >>= toCalendarTime
main = do tm <- today
putStrLn $ formatCalendarTime defaultTimeLocale "%Y-%m-%d" tm
だいぶすっきり。