From 63093c32f33ad1fcfef10d2ef6ef010c2b5471e9 Mon Sep 17 00:00:00 2001 From: hallgren Date: Thu, 8 Nov 2012 15:53:46 +0000 Subject: Eliminate warnings about deprecated use of catch and try This is also needed for compatibility with GHC 7.6. --- src/compiler/GF/System/Catch.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/compiler/GF/System/Catch.hs (limited to 'src/compiler/GF/System') diff --git a/src/compiler/GF/System/Catch.hs b/src/compiler/GF/System/Catch.hs new file mode 100644 index 000000000..85d993435 --- /dev/null +++ b/src/compiler/GF/System/Catch.hs @@ -0,0 +1,14 @@ +-- | Isolate backwards incompatible library changes to 'catch' and 'try' +{-# LANGUAGE CPP #-} +module GF.System.Catch where +import qualified System.IO.Error as S + +#include "cabal_macros.h" + +#if MIN_VERSION_base(4,4,0) +catch = S.catchIOError +try = S.tryIOError +#else +catch = S.catch +try = S.try +#endif -- cgit v1.2.3