[Haskell] strictness of putChar: report incomplete?

Ross Paterson ross at soi.city.ac.uk
Wed Oct 5 11:30:19 EDT 2005


On Wed, Oct 05, 2005 at 04:01:09PM +0100, Simon Marlow wrote:
> No, of course I don't expect the monad laws to hold :)
> 
> But the intended meaning of 
> 
>         (do _|_; return () :: IO ()) `seq` True
> 
> is True, not _|_, right?  This isn't made explicit in the report, but
> it's how we all understand the IO monad to work, and perhaps derives
> from the well-known implementation of (IO a) as (World -> (a,World)).

Actually, from a resumption-based semantics of IO, I was expecting _|_,
but I see all the implementations get it wrong.



More information about the Haskell mailing list