make ExitCode an instance of Exception for nhc98
[ghc-base.git] / Control / Exception.hs
index e52d2e8..b3638f6 100644 (file)
@@ -187,6 +187,10 @@ instance Exception IOError where
     toException                     = SomeException
     fromException (SomeException e) = Just (unsafeCoerce e)
 
+instance Exception ExitCode where
+    toException                     = SomeException
+    fromException (SomeException e) = Just (unsafeCoerce e)
+
 data ArithException
 data ArrayException
 data AsyncException