
14 May
2002
14 May
'02
9:24 a.m.
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 Libraries documentation sec. 5.12.3 is not that actually implemented by GHC.
evaluate' :: a -> IO a; evaluate' a = a `seq` return a;
"evaluate' undefined" is bottom, whereas "Expression.evaluate undefined" is an IO action that "fails" when executed. But both will be 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. Cheers, Simon
8456
Age (days ago)
8456
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Marlow