[Haskell-cafe] IO is not a monad

Yitzchak Gale gale at sefer.org
Tue Jan 23 06:35:48 EST 2007


<troll>

Prelude> let f .! g = ((.) $! f) $! g
Prelude> let f = undefined :: Int -> IO Int
Prelude> f `seq` 42
*** Exception: Prelude.undefined
Prelude> ((>>= f) . return) `seq` 42
42
Prelude> ((>>= f) .! return) `seq` 42
42

</troll>

Regards,
Yitz


More information about the Haskell-Cafe mailing list