
5 Feb
2009
5 Feb
'09
11:33 a.m.
On Thu, Feb 5, 2009 at 10:00 AM, Lennart Augustsson
There's nothing magic about IO when it comes to monad semantics. If you take ghc's implementation of IO, it's a state monad.
Doesn't that mean the semantics are defined by the implementation? My problem is that I'm not seeing how correct eval sequencing can be forced unless a magic token is passed around, which means that /some/ such hidden semantics must be part of the formal semantics of IO. In other words, it's not enough for it to be a monad, since >>= by itself cannot guarantee data dependency. If it doesn't pass around the World token, we don't get sequencing. -g