[Haskell-cafe] Using catch and errors

Alexandre Weffort Thenorio alethenorio at home.se
Fri Apr 22 13:04:28 EDT 2005

> You need a "do" not a lambda ( or use >> )
> when (stuff) (do putStrLn "blah"
>                   getLine
>                   exitWith ExitSuccess)
> or
> when (stuff) (putStrLn "blah" >> getLine >> exitWith ExitSuccess)

Thanks a lot. Problem gone now. :)

> No, that should work.  Haskell equality is not at all like Java
> equality.  In java, '=' basicaly means pointer equality.  I am not aware
> of a way to even make that comparison in Haskell (in general).  Haskell
> '=' behaves a lot more like equals() in Java.
> Remove the length test and I think your condition will do what you expect.

Splitted in two lines and it worked fine, but I still think it should have
worked fnie as was before.

Thanks a lot.

Best Regards


More information about the Haskell-Cafe mailing list