[Haskell] IO question

2004-06-11 Thread Tom Hofte
Hi, I have an question about the IO monad I want to have a function that unpack an IO. I should have the type: IO a - a. Is this possible? Kind regards Tom Hofte ___ Haskell mailing list [EMAIL PROTECTED]

Re: [Haskell] IO question

2004-06-11 Thread Tomasz Zielonka
On Fri, Jun 11, 2004 at 01:23:11PM +0200, Tom Hofte wrote: I want to have a function that unpack an IO. I should have the type: IO a - a. Is this possible? There is unsafePerformIO, but before you use it, think - do you really, really want to use it and you really, really know what the

Re: [Haskell] IO question

2004-06-11 Thread Ronny Wichers Schreur
Tom Hofte writes (to the Haskell mailing list): I want to have a function that unpack an IO. I should have the type: IO a - a. Is this possible? Tomasz Zielonka replies: There is unsafePerformIO, but before you use it, think [..] See also http://www.haskell.org/hawiki/ThatAnnoyingIoType. Cheers,

Re: [Haskell] IO question

2004-06-11 Thread Keith Wansbrough
On Fri, Jun 11, 2004 at 01:23:11PM +0200, Tom Hofte wrote: I want to have a function that unpack an IO. I should have the type: IO a - a. Is this possible? There is unsafePerformIO, but before you use it, think - do you really, really want to use it and you really, really know what the

Re: [Haskell] IO question

2004-06-11 Thread Frank Seaton Taylor
On 11 Jun 2004, at 08:50, Keith Wansbrough wrote: On Fri, Jun 11, 2004 at 01:23:11PM +0200, Tom Hofte wrote: I want to have a function that unpack an IO. I should have the type: IO a - a. Is this possible? There is unsafePerformIO, but before you use it, think - do you really, really want to use

Re: [Haskell] IO question

2004-06-11 Thread Keith Wansbrough
(and the ghost of Launchbury whispers in my ear that this is the Haskell list, and unsafePerformIO is not Haskell!). John is dead?!?!?! Not to my knowledge, just not on the mailing list... --KW 8-) -- Keith Wansbrough [EMAIL PROTECTED] http://www.cl.cam.ac.uk/users/kw217/ University of

Re: [Haskell] IO question

2004-06-11 Thread Graham Klyne
At 13:23 11/06/04 +0200, Tom Hofte wrote: Hi, I have an question about the IO monad I want to have a function that unpack an IO. I should have the type: IO a - a. Is this possible? Possible, but... in addition to other responses, I'd also recommend looking at this:

Re: [Haskell] IO question

2004-06-11 Thread b . i . mills
While what I want to say has implicitly been said I'd just like to suggest that there is a simple way to put the whole matter less cryptically. The obvious question that just about anyone starting with the IO monad asks is how can I write (IO a - a)? The simple answer is, you don't have to