[Haskell-cafe] background question about IO monad
uhollerbach at gmail.com
Wed Feb 6 23:13:02 EST 2008
Well, you may well be right! Just think of me as a planarian at the opera... :-)
On 2/6/08, Jonathan Cast <jonathanccast at fastmail.fm> wrote:
> On 6 Feb 2008, at 7:30 PM, Uwe Hollerbach wrote:
> > Hi, all, thanks for the responses. I understand the distinction
> > between pure functions and impure functions/procedures/IO actions,
> Um, I'm not sure of that, given what you go on to say.
> > it
> > just felt to me in the samples that I quoted that I was in fact
> > starting from basically the starting point,
> Not really. The key difference to understand is that between
> difference between getCurrentTime and toUTCTime 42. These are your
> `starting points' --- the rest is just pure code.
> > eventually getting to the
> > same endpoint (or at least a pair of endpoints that are not easily
> > distinguished from each other by looking just at code), and inbetween
> Well, the in-between paths are pure (or can be) either way. It's the
> starting point that needs liftIO or not.
> > one path was going through liftIO and the other not. But I guess it
> > comes down to the fact that, since I'm in a REPL, I'm wallowing in
> > impurity all the time (or something like that :-) )
More information about the Haskell-Cafe