On Thu, 2009-01-01 at 02:17 -0800, Ryan Ingram wrote:
> 2008/12/31 Paolino <paolo.verone...@gmail.com>:
> > I must ask why runWriterT k :: State s (a,[Int]) is working.
> > Looks like I could runIO the same way I evalState there.
> > In that case I wouldn't wait for the State s action to finish.
> >
> > Thanks
> 
> Assuming you have Control.Monad.State.Lazy (which I think is the
> default), here is the difference:
[...]
There's a much simpler way of understanding why you must wait for an IO
computation to finish before you can use the result.  In IO you can
throw exceptions (IOErrors), so you must wait until an IO computation is
finished to know that there is any result at all.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to