[Haskell-cafe] Re: Referential Transparency and Monads
Heinrich Apfelmus
apfelmus at quantentunnel.de
Fri Apr 10 00:33:52 EDT 2009
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
More information about the Haskell-Cafe
mailing list