[Haskell] strictness of putChar: report incomplete?

Wolfgang Jeltsch wolfgang at jeltsch.net
Wed Oct 5 11:43:28 EDT 2005


Am Mittwoch, 5. Oktober 2005 17:01 schrieb Simon Marlow:
> On 05 October 2005 15:46, Ross Paterson wrote:
> > On Wed, Oct 05, 2005 at 03:22:29PM +0100, Simon Marlow wrote:
> >> 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.
> >
> > What's wrong with identifying them?  You're not expecting the monad
> > laws to hold, are you?
>
> No, of course I don't expect the monad laws to hold :)

It's terrible that the monad laws don't hold for the IO *monad*.  I suppose, 
it all has to do with the type of seq being too general.  In my opinion, this 
is a very serious problem since Haskell is a language which is expected to 
have a sound theoretical foundation.  So I think that this problem should be 
addressed in the future under all circumstances.

> [...]

Best wishes,
Wolfgang


More information about the Haskell mailing list