[Haskell-beginners] Error Handling and case statements

Isaac Dupree ml at isaac.cedarswampstudios.org
Mon Nov 2 00:04:00 EST 2009


iæfai wrote:
> I have been trying to work out a problem for the last few hours with 
> little success.
> ...
>     config <- case opt of
>         Left (_, err) -> ioError (userError err)
>         Right (config) ->  config 

does changing the last line to
Right (config) ->  return config

fix your type error?

-Isaac


More information about the Beginners mailing list