[Haskell] strictness of putChar: report incomplete?

Lennart Augustsson lennart at augustsson.net
Wed Oct 5 12:05:19 EDT 2005


Wolfgang Jeltsch wrote:
> Am Mittwoch, 5. Oktober 2005 16:22 schrieb Simon Marlow:
> 
>>[...]
> 
> 
>>Also, GHC's optimiser currently treats (_|_ :: IO a) and (do _|_; return
>>()) as interchangeable, which is naughty, and people have occasionally
>>noticed, but the benefits can sometimes be huge.  It is this distinction
>>that makes it hard to optimise IO code in a Haskell compiler, though.
> 
> 
> I think, seq should be a method of a type class.  Then we could forbid 
> applying seq to a function, we could forbid applying seq to an IO expression 
> and we could forbid applying seq to expressions of any type with hidden 
> implementation for which we don't want to provide bottom tests.

I agree with you.  And that is how it used to be, but then
some people didn't think that was convenient enough so now
we are stuck with a seq that (IMHO) stinks. :)

	-- Lennart


More information about the Haskell mailing list