summaryrefslogtreecommitdiff
path: root/compiler/utils/Exception.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils/Exception.hs')
-rw-r--r--compiler/utils/Exception.hs8
1 files changed, 0 insertions, 8 deletions
diff --git a/compiler/utils/Exception.hs b/compiler/utils/Exception.hs
index fa067b0859..28196eba2b 100644
--- a/compiler/utils/Exception.hs
+++ b/compiler/utils/Exception.hs
@@ -74,19 +74,11 @@ class Monad m => ExceptionMonad m where
_ <- sequel
return r
-#if __GLASGOW_HASKELL__ < 613
-instance ExceptionMonad IO where
- gcatch = catch
- gmask f = block $ f unblock
- gblock = block
- gunblock = unblock
-#else
instance ExceptionMonad IO where
gcatch = catch
gmask f = mask (\x -> f x)
gblock = block
gunblock = unblock
-#endif
gtry :: (ExceptionMonad m, Exception e) => m a -> m (Either e a)
gtry act = gcatch (act >>= \a -> return (Right a))