logo       

[no subject]: msg#00000

lang.haskell.glasgow.bugs


For "user" errors (those which are raised using
fail), the
string returned by ioeGetErrorString is the argument
that
was passed to fail

On version 5.04, compiled under SunOS,
ioeGetErrorString seems to return the result of `show`ing
this string. Compiling and running:

>
> import IO
>
> main = fail "foo\ngoo" `catch` (putStrLn .
ioeGetErrorString)
>

results in:

"foo\ngoo"

as opposed to:

foo
goo

Thanks,
Gordon
gordon.pace@xxxxxxx

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=611512&group_id=8032


From my understanding the Haskell reports,
ioeGetErrorString
should return the failure string. To quote:

For "user" errors (those which are raised using
fail), the
string returned by ioeGetErrorString is the argument
that
was passed to fail

On version 5.04, compiled under SunOS,
ioeGetErrorString seems to return the result of `show`ing
this string. Compiling and running:

>
> import IO
>
> main = fail "foo\ngoo" `catch` (putStrLn .
ioeGetErrorString)
>

results in:

"foo\ngoo"

as opposed to:

foo
goo

Thanks,
Gordon
gordon.pace@xxxxxxx

----------------------------------------------------------------------

>Comment By: Simon Marlow (simonmar)
Date: 2002-09-19 12:37

Message:
Logged In: YES
user_id=48280

Fixed in 5.04.1.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=611512&group_id=8032


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise