* s9gf4...@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 ?
> 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 ?
___
Haskell-Caf
* s9gf4...@gmail.com [2012-10-05 16:52:52+0600]
> > No, it won't force the return value. To do that, use evaluate
> > http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Exc
> > eption-Base.html#g:7
> But what is happening when exception is raised when consuming value from
>
> No, it won't force the return value. To do that, use evaluate
> http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Exc
> eption-Base.html#g:7
But what is happening when exception is raised when consuming value from
result of "try" ?
try has signature
try :: Exception e => I
* s9gf4...@gmail.com [2012-10-05 16:02:03+0600]
> if i have some lazy io action, assuming (maction :: IO a) which may raise
> exceptions while running, will "try" force evaluation of "a" to determine is
> exception raised or not ?
> Sorry for my broken english.
No, it won't force the return val
if i have some lazy io action, assuming (maction :: IO a) which may raise
exceptions while running, will "try" force evaluation of "a" to determine is
exception raised or not ?
Sorry for my broken english.
___
Haskell-Cafe mailing list
Haskell-Cafe@has