Prelude.catch vs. Exception.catch
Tue, 14 May 2002 10:24:43 +0100
> At 2002-05-13 22:07, Ashley Yakeley wrote:
> >I've noticed something a bit unusual about Exception.catch.
> Curiously, the definition of Exception.evaluate given in the GHC=20
> Libraries documentation sec. 5.12.3 is not that actually=20
> implemented by=20
> evaluate' :: a -> IO a;
> evaluate' a =3D a `seq` return a;
> "evaluate' undefined" is bottom, whereas "Expression.evaluate=20
> is an IO action that "fails" when executed. But both will be=20
> caught by Exception.catch.
This is bizarre: the definition of evaluate in Exception is exactly the
one you gave above, yet they behave differently. You may have uncovered
a compiler bug, I'll look into it.