> > tryAll (runST (return (error "BANG!")))
> >
> > will return (Right (error "BANG!")), because return isn't strict.
>
> Nope,
> main = tryAll (runST (return (error "BANG!"::()))) >>= print
> yields `Left "BANG!"'!
>
>
> but
> main = tryAll (runST (
> return ((error "BANG!", 42) :: (Int,Int))
> )) >>= print
>
> leads to an error (for the reason you mentioned).
Yes, you're right. I was confusing this with
tryAllIO (return (error "BANG!"))
which will return 'Right (error "BANG!")'.
> Maybe someone can add a note about this gotcha in the docs
> (sec-exception.html#3.8.3)?
Ok, I'll add a note about it.
Cheers,
Simon