Remove Control.Parallel*, now in package parallel
[haskell-directory.git] / GHC / Err.lhs
index 803fdf0..946ca36 100644 (file)
@@ -1,5 +1,5 @@
 \begin{code}
-{-# OPTIONS -fno-implicit-prelude #-}
+{-# OPTIONS_GHC -fno-implicit-prelude #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  GHC.Err
@@ -19,6 +19,7 @@
 -- 
 -----------------------------------------------------------------------------
 
+-- #hide
 module GHC.Err 
        (
          irrefutPatError
@@ -31,6 +32,7 @@ module GHC.Err
 
        , absentErr                -- :: a
        , divZeroError             -- :: a
+       , overflowError            -- :: a
 
        , error                    -- :: String -> a
        , assertError              -- :: String -> Bool -> a -> a
@@ -129,12 +131,17 @@ untangle coded message
     not_bar c = c /= '|'
 \end{code}
 
-Divide by zero.  We put it here because it is needed relatively early
+Divide by zero and arithmetic overflow.
+We put them here because they are needed relatively early
 in the libraries before the Exception type has been defined yet.
 
 \begin{code}
 {-# NOINLINE divZeroError #-}
 divZeroError :: a
 divZeroError = throw (ArithException DivideByZero)
+
+{-# NOINLINE overflowError #-}
+overflowError :: a
+overflowError = throw (ArithException Overflow)
 \end{code}