Stupid wuestion about Monads :)

Nick Name nick.name@inwind.it
Wed, 11 Jun 2003 22:29:53 +0200


On Wed, 11 Jun 2003 20:00:00 +0200
Filip <tomf16@poczta.onet.pl> wrote:

> What should I do if I have something like "IO Bool" and I need "Bool"

IO Bool means "an action that can perform IO and returns a Bool". You
can't get a Bool without performing IO with that function, so you can't
get a Bool from a "IO Bool"; indeed you can write your own action wich
uses the function and its result. This action will "eventually perform
IO", and so it will be IO <something>. 

see:

http://www.haskell.org/hawiki/ThatAnnoyingIoType

and read the gentle introduction as Derek Elkins told you.

Vincenzo

-- 
Scopriti essere umano e in quanto tale persona banale e non speciale
a cui Dio concede gesti assai banali. D'ora in poi quello sei tu.
[Marlene Kuntz]