From 2c2943905952c7298b38047f612cdcef2d9e4aa5 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 28 May 2002 14:04:18 +0000 Subject: [PATCH] [project @ 2002-05-28 14:04:18 by simonmar] Fix mistake in 'evaluate'. --- Control/Exception.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Control/Exception.hs b/Control/Exception.hs index 5231db4..be7595e 100644 --- a/Control/Exception.hs +++ b/Control/Exception.hs @@ -223,7 +223,10 @@ handleJust p = flip (catchJust p) -- -- NOTE: @(evaluate a)@ is /not/ the same as @(a \`seq\` return a)@. evaluate :: a -> IO a -evaluate a = IO $ \s -> a `seq` (# s, a #) +evaluate a = IO $ \s -> case a `seq` () of () -> (# s, a #) + -- NB. can't write + -- a `seq` (# s, a #) + -- because we can't have an unboxed tuple as a function argument ----------------------------------------------------------------------------- -- 'try' and variations. -- 1.7.10.4