
8 Dec
2009
8 Dec
'09
6:33 p.m.
Excerpts from Torsten Otto's message of Tue Dec 08 18:18:54 -0500 2009:
time = formatiereZeit (NOW WHAT?)
Would the current time step out of the IO monad, please?
Unfortunately, there is no way to "step out" of the IO monad: once in the IO monad, always in the IO monad. However, if you let time be of type IO String instead of String, you can do: time = (liftM formatiereZeit) getClockTime Where liftM :: (a -> b) -> m a -> m b, i.e. it converts your function ClockTime -> String into IO ClockTime -> IO String. Cheers, Edward