Eliminate warnings about deprecated use of catch and try

This is also needed for compatibility with GHC 7.6.
This commit is contained in:
hallgren
2012-11-08 15:53:46 +00:00
parent ad74dfe527
commit c2b7288411
7 changed files with 29 additions and 5 deletions

View File

@@ -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