summaryrefslogtreecommitdiff
path: root/src/compiler/GF/System
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2012-11-08 15:53:46 +0000
committerhallgren <hallgren@chalmers.se>2012-11-08 15:53:46 +0000
commit63093c32f33ad1fcfef10d2ef6ef010c2b5471e9 (patch)
treed41a1ea8c6c5e58353f3a81440291be6d57d6e3b /src/compiler/GF/System
parent1c0429c322d71c5488604785cf7278fe4ac67bf7 (diff)
Eliminate warnings about deprecated use of catch and try
This is also needed for compatibility with GHC 7.6.
Diffstat (limited to 'src/compiler/GF/System')
-rw-r--r--src/compiler/GF/System/Catch.hs14
1 files changed, 14 insertions, 0 deletions
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