From aa6cb2fe9270d987918d188a894bebc11a729c2d Mon Sep 17 00:00:00 2001 From: sof Date: Thu, 10 Oct 2002 14:35:55 +0000 Subject: [PATCH] [project @ 2002-10-10 14:35:55 by sof] make it compile with 4.08 (module author may very reasonably want to abstract away the ifdef this commit intros.) --- ghc/compiler/typecheck/TcRnTypes.lhs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/typecheck/TcRnTypes.lhs b/ghc/compiler/typecheck/TcRnTypes.lhs index 218e8fe..dab9494 100644 --- a/ghc/compiler/typecheck/TcRnTypes.lhs +++ b/ghc/compiler/typecheck/TcRnTypes.lhs @@ -74,7 +74,7 @@ import UNSAFE_IO ( unsafeInterleaveIO ) import FIX_IO ( fixIO ) import Maybe ( mapMaybe ) import List ( nub ) -import EXCEPTION as Exception ( try, Exception ) +import EXCEPTION as Exception \end{code} @@ -154,7 +154,11 @@ Error recovery \begin{code} tryM :: TcRn m r -> TcRn m (Either Exception.Exception r) -- Reflect exception into TcRn monad +#if __GLASGOW_HASKELL__ <= 408 +tryM (TcRn thing) = TcRn (\ env -> Exception.tryAllIO (thing env)) +#else tryM (TcRn thing) = TcRn (\ env -> Exception.try (thing env)) +#endif \end{code} Lazy interleave -- 1.7.10.4