
10 Apr
2009
10 Apr
'09
12:33 a.m.
Luke Palmer wrote:
Miguel Mitrofanov wrote:
I'm not sure what you mean by that, but semantically IO is definitely
*not* a state monad. Under any circumstances or any set of assumptions.
Ehm? Why not?
Mainly forkIO. There may be other reasons.
"Tackling the awkward squad" mentions that loop :: IO () loop = loop and loop' :: IO () loop' = putStr "o" >> loop' are indistinguishable in the IO a ~ World -> (a, World) semantics. Both expressions would be _|_. But clearly, the latter produces some output while the former just hangs. Regards, apfelmus -- http://apfelmus.nfshost.com