From 1035080ac81da149d84eb7c45961faeadd8ddb62 Mon Sep 17 00:00:00 2001 From: ross Date: Fri, 20 Dec 2002 18:43:53 +0000 Subject: [PATCH] [project @ 2002-12-20 18:43:53 by ross] Hugs only: use new version of evaluate. --- Control/Exception.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 ----------------------------------------------------------------------------- -- 1.7.10.4