From: ross Date: Fri, 20 Dec 2002 18:43:53 +0000 (+0000) Subject: [project @ 2002-12-20 18:43:53 by ross] X-Git-Tag: nhc98-1-18-release~768 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1035080ac81da149d84eb7c45961faeadd8ddb62;p=ghc-base.git [project @ 2002-12-20 18:43:53 by ross] Hugs only: use new version of evaluate. --- diff --git a/Control/Exception.hs b/Control/Exception.hs index 07115f5..dc01d93 100644 --- a/Control/Exception.hs +++ b/Control/Exception.hs @@ -238,14 +238,12 @@ handleJust p = flip (catchJust p) -- > catch (evaluate undefined) (\e -> return ()) ==> return () -- -- NOTE: @(evaluate a)@ is /not/ the same as @(a \`seq\` return a)@. +#ifdef __GLASGOW_HASKELL__ evaluate :: a -> IO a -#if defined(__GLASGOW_HASKELL__) 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 -#elif defined(__HUGS__) -evaluate a = a `seq` return a -- dummy implementation: to be fixed #endif -----------------------------------------------------------------------------