
16 Jun
2008
16 Jun
'08
3:11 p.m.
Henning Thielemann
On Mon, 16 Jun 2008, Achim Schneider wrote:
We have to resort to IO actions to get the time, and to IORefs because we need to chain up different calls to getCurrentTime using the IO Monad. The rest of the program can work with whatever you like best.
Isn't (StateT s IO a) the cleaner alternative to IORef?
Yes. But then using one IORef in one place won't make your program harder to understand, using Monad transformers quite certainly will. Admittedly, I'm becoming dodgy. -- (c) this sig last receiving data processing entity. Inspect headers for past copyright information. All rights reserved. Unauthorised copying, hiring, renting, public performance and/or broadcasting of this signature prohibited.