[Haskell-cafe] How can I stop GHCi from calling "show" for IO actions?

Henning Thielemann lemming at henning-thielemann.de
Mon Sep 17 14:58:48 EDT 2007


On Sat, 15 Sep 2007, Sam Hughes wrote:

> That's weird.
>
> Prelude> (x,y) <- return $ (repeat 1, repeat 2)

You didn't tell, which Monad this shall be.

> Prelude> Just x <- return $ Just (repeat 1)
> [1,1,1,...
> Prelude> (x,_) <- return $ (repeat 1, repeat 2)
> [1,1,1,...
> Prelude> Just (x,y) <- return $ Just (repeat 1, repeat 2)
> Prelude>


More information about the Haskell-Cafe mailing list