[Haskell-cafe] does try force evaluation of IO value

Roman Cheplyaka roma at ro-che.info
Sat Oct 6 01:53:37 CEST 2012


* s9gf4ult at gmail.com <s9gf4ult at gmail.com> [2012-10-05 17:19:21+0600]
> >   Prelude Control.Exception> r <- try (return $ error "bam") :: IO (Either
> > SomeException Int) Prelude Control.Exception> r
> >   Right *** Exception: bam
> Wow, this is realy breaking news for me. Where can i read more about this 
> magic ?

See chapter 19 of Real World Haskell, especially section "Laziness and
Exception Handling".
http://book.realworldhaskell.org/read/error-handling.html

Roman



More information about the Haskell-Cafe mailing list