summaryrefslogtreecommitdiff
path: root/libraries/base/GHC/IO/Exception.hs
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/base/GHC/IO/Exception.hs')
-rw-r--r--libraries/base/GHC/IO/Exception.hs22
1 files changed, 20 insertions, 2 deletions
diff --git a/libraries/base/GHC/IO/Exception.hs b/libraries/base/GHC/IO/Exception.hs
index 9203f46828..bd9a15216d 100644
--- a/libraries/base/GHC/IO/Exception.hs
+++ b/libraries/base/GHC/IO/Exception.hs
@@ -33,6 +33,7 @@ module GHC.IO.Exception (
ArrayException(..),
ExitCode(..),
+ FixIOException (..),
ioException,
ioError,
@@ -225,7 +226,9 @@ data AsyncException
-- ^This exception is raised by default in the main thread of
-- the program when the user requests to terminate the program
-- via the usual mechanism(s) (e.g. Control-C in the console).
- deriving (Eq, Ord)
+ deriving ( Eq -- ^ @since 4.2.0.0
+ , Ord -- ^ @since 4.2.0.0
+ )
-- | @since 4.7.0.0
instance Exception AsyncException where
@@ -240,7 +243,9 @@ data ArrayException
| UndefinedElement String
-- ^An attempt was made to evaluate an element of an
-- array that had not been initialized.
- deriving (Eq, Ord)
+ deriving ( Eq -- ^ @since 4.2.0.0
+ , Ord -- ^ @since 4.2.0.0
+ )
-- | @since 4.1.0.0
instance Exception ArrayException
@@ -268,6 +273,19 @@ instance Show ArrayException where
. (if not (null s) then showString ": " . showString s
else id)
+-- | The exception thrown when an infinite cycle is detected in
+-- 'System.IO.fixIO'.
+--
+-- @since 4.11.0.0
+data FixIOException = FixIOException
+
+-- | @since 4.11.0.0
+instance Exception FixIOException
+
+-- | @since 4.11.0.0
+instance Show FixIOException where
+ showsPrec _ FixIOException = showString "cyclic evaluation in fixIO"
+
-- -----------------------------------------------------------------------------
-- The ExitCode type