From: simonmar Date: Thu, 11 Nov 1999 15:20:29 +0000 (+0000) Subject: [project @ 1999-11-11 15:20:28 by simonmar] X-Git-Tag: Approximately_9120_patches~5576 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f4f72700b9845f704d1654ff0d1a8494af353adb;p=ghc-hetmet.git [project @ 1999-11-11 15:20:28 by simonmar] grrr, back out changes that snuck in with previous commit. --- diff --git a/ghc/lib/std/Ix.lhs b/ghc/lib/std/Ix.lhs index 060c923..e7ee204 100644 --- a/ghc/lib/std/Ix.lhs +++ b/ghc/lib/std/Ix.lhs @@ -54,7 +54,6 @@ class (Ord a) => Ix a where -- Must specify one of index, unsafeIndex index b i | inRange b i = unsafeIndex b i | otherwise = error "Error in array index" - -- ToDo: raise (ArrayException IndexOutOfRange) unsafeIndex b i = index b i \end{code} diff --git a/ghc/lib/std/PrelArr.lhs b/ghc/lib/std/PrelArr.lhs index e36c52c..dea699a 100644 --- a/ghc/lib/std/PrelArr.lhs +++ b/ghc/lib/std/PrelArr.lhs @@ -143,7 +143,7 @@ done (l,u) marr = \s1 -> arrEleBottom :: a arrEleBottom = error "(Array.!): undefined array element" --- ToDo: arrEleBottom = throw (ArrayException (UndefinedElement "Array.!")) + ----------------------------------------------------------------------- -- These also go better with magic: (//), accum, accumArray diff --git a/ghc/lib/std/PrelException.lhs b/ghc/lib/std/PrelException.lhs index d434c5a..bed83d7 100644 --- a/ghc/lib/std/PrelException.lhs +++ b/ghc/lib/std/PrelException.lhs @@ -1,5 +1,5 @@ % ----------------------------------------------------------------------------- -% $Id: PrelException.lhs,v 1.9 1999/11/11 15:18:00 simonmar Exp $ +% $Id: PrelException.lhs,v 1.10 1999/11/11 15:20:29 simonmar Exp $ % % (c) The GRAP/AQUA Project, Glasgow University, 1998 % @@ -38,7 +38,6 @@ data Exception | AssertionFailed String -- Assertions | DynException Dynamic -- Dynamic exceptions | AsyncException AsyncException -- Externally generated errors - | ArrayException ArrayException -- Array-related exceptions | NonTermination data ArithException @@ -55,11 +54,6 @@ data AsyncException | ThreadKilled deriving (Eq, Ord) -data ArrayException - = IndexOutOfBounds String - | UndefinedElement String - deriving (Eq, Ord) - stackOverflow, heapOverflow :: Exception -- for the RTS stackOverflow = AsyncException StackOverflow heapOverflow = AsyncException HeapOverflow @@ -76,12 +70,6 @@ instance Show AsyncException where showsPrec _ HeapOverflow = showString "heap overflow" showsPrec _ ThreadKilled = showString "thread killed" -instance Show ArrayException where - showsPrec _ (IndexOutOfBounds s) = showString "array index out of bounds: " - . showString s - showsPrec _ (UndefinedElement s) = showString "undefined array element: " - . showString s - instance Show Exception where showsPrec _ (IOException err) = shows err showsPrec _ (ArithException err) = shows err diff --git a/ghc/lib/std/PrelForeign.lhs b/ghc/lib/std/PrelForeign.lhs index ed575ef..9e326cb 100644 --- a/ghc/lib/std/PrelForeign.lhs +++ b/ghc/lib/std/PrelForeign.lhs @@ -51,7 +51,7 @@ writeForeignObj (ForeignObj fo#) (A# datum#) = IO ( \ s# -> eqForeignObj mp1 mp2 = unsafePerformIO (primEqForeignObj mp1 mp2) /= (0::Int) -foreign import "eqForeignObj" unsafe primEqForeignObj :: ForeignObj -> ForeignObj -> IO Int +foreign import "eqForeignObj" primEqForeignObj :: ForeignObj -> ForeignObj -> IO Int instance Eq ForeignObj where p == q = eqForeignObj p q