From e9acdb5bae40a0a525544aa58ef3026a23ffe3cb Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 8 Mar 2002 16:00:39 +0000 Subject: [PATCH] [project @ 2002-03-08 16:00:39 by simonmar] Make this compile with various GHC versions (hopefully) --- ghc/compiler/rename/RnHiFiles.lhs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/rename/RnHiFiles.lhs b/ghc/compiler/rename/RnHiFiles.lhs index d9fec6e..586f653 100644 --- a/ghc/compiler/rename/RnHiFiles.lhs +++ b/ghc/compiler/rename/RnHiFiles.lhs @@ -64,7 +64,7 @@ import Panic import Config import IOExts -import Exception ( tryAllIO, Exception(DynException) ) +import Exception import Dynamic ( fromDynamic ) import Directory import List ( isSuffixOf ) @@ -581,7 +581,7 @@ readIface file_path }} else - ioToRnM_no_fail (tryAllIO (Binary.getBinFileWithDict file_path)) + ioToRnM_no_fail (myTry (Binary.getBinFileWithDict file_path)) `thenRn` \ either_iface -> case either_iface of @@ -597,6 +597,12 @@ readIface file_path loc = mkSrcLoc (mkFastString file_path) 1 bale_out err = returnRn (Left (badIfaceFile file_path err)) + +#if __GLASGOW_HASKELL__ < 501 +myTry = Exception.tryAllIO +#else +myTry = Exception.try +#endif \end{code} %********************************************************* -- 1.7.10.4