From: simonmar Date: Tue, 28 May 2002 14:04:18 +0000 (+0000) Subject: [project @ 2002-05-28 14:04:18 by simonmar] X-Git-Tag: nhc98-1-18-release~1000 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=2c2943905952c7298b38047f612cdcef2d9e4aa5;p=ghc-base.git [project @ 2002-05-28 14:04:18 by simonmar] Fix mistake in 'evaluate'. --- 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.