[Haskell-beginners] Getting the current system date outside the IO Monad

AbdulSattar Mohammed codingtales at gmail.com
Tue Dec 27 09:41:34 CET 2011


I'm still learning Haskell and I've started learning Yesod. I pretty much
built a blog before I came this silly roadblock.

Whenever I create a new post, I want it take the current system time as its
creation time. I understand it's an impure operation and it must go into
the IO Monad to be performed. But, in Yesod, your handler is of the type
Handler RepHtml. I don't get how you could get the impure value into a pure
function without main playing any part.

Here's the link for my blog: http://hpaste.org/55757#line85

-- 
Warm Regards,

AbdulSattar Mohammed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20111227/807de9dd/attachment.htm>


More information about the Beginners mailing list