Re: IOError

2003-06-12 Thread Wolfgang Jeltsch
On Thursday, 2003-06-12, 18:01, CEST, Filip wrote: Hi, I wrote something like let t = try (hGetLine h1) and I would like to check is it EOFError or not. How can I do this ?? Thanks Hello, the above code assigns the I/O action try (hGetLine h1) to t. I suppose you want to assign the

Re: IOError

2003-06-12 Thread Dean Herington
On Thu, 12 Jun 2003, Wolfgang Jeltsch wrote: On Thursday, 2003-06-12, 18:01, CEST, Filip wrote: Hi, I wrote something like let t = try (hGetLine h1) and I would like to check is it EOFError or not. How can I do this ?? Thanks Hello, the above code assigns the I/O action

Re: IOError

2003-06-12 Thread Wolfgang Jeltsch
On Thursday, 2003-06-12, 21:02, CEST, Dean Herington wrote: On Thu, 12 Jun 2003, Wolfgang Jeltsch wrote: [...] You can then examine t as in the following example: t - try (hGetLine h1) case t of Left error | isEOFError error - do EOF handling Right

RE: IOError vs. Exception vs. IOException

2002-11-04 Thread Simon Peyton-Jones
| FWIW, I agree with you, and I don't have any objections to changing it | (but Simon P.J. might). I doubt I'd have an objection. Want to make a concrete proposal to the libraries list? I didn't get exactly what it was from your messages. Simon ___

RE: IOError vs. Exception vs. IOException

2002-11-01 Thread Simon Marlow
Ross Paterson [EMAIL PROTECTED] cryptically writes: Shouldn't IOError be identified with IOException rather than Exception? I had to grovel through the code to understand what this question means. Well, you could have grovelled through the documentation instead :-)

RE: IOError vs. Exception vs. IOException

2002-11-01 Thread Simon Marlow
Personally I'm not completely happy with the design, the IOError==Exception thing is a bit strange. But most of the complication arises if you try to mix the two interfaces to exceptions (IO and Exception) - if you stick to the Exception interface then the design is quite

Re: IOError vs. Exception vs. IOException

2002-10-31 Thread Alastair Reid
Ross Paterson [EMAIL PROTECTED] cryptically writes: Shouldn't IOError be identified with IOException rather than Exception? I had to grovel through the code to understand what this question means. It seems that GHC.IOBase contains these definitions: type IOError = Exception data