[Haskell] strictness of putChar: report incomplete?

John Meacham john at repetae.net
Tue Oct 4 07:51:12 EDT 2005

The report does not seem to specify whether 

putChar _|_ is _|_ or not.  (although it might be implied somewhere I
didn't see)

I orginally noticed this when jhc treated it as so and I considered
this a bug since the argument should not be evaluated until the action
is actually executed.

however, it appears ghc has the same bug, or my reasoning is wrong. not
only that, but hugs and ghc disagree with each other.

putChar _|_ -> _|_
putStr _|_ -> valid IO ()

putChar _|_ -> valid IO ()
putStr _|_ -> valid IO () 

all the IO actions are bottom on execution of course. 

I believe the hugs behavior is correct and ghc and jhc are wrong, but
there were differing opinions on #haskell.


John Meacham - ⑆repetae.net⑆john⑈ 

More information about the Haskell mailing list