Remove code that is dead now that we need >= 6.12 to build
authorIan Lynagh <igloo@earth.li>
Wed, 15 Dec 2010 20:10:06 +0000 (20:10 +0000)
committerIan Lynagh <igloo@earth.li>
Wed, 15 Dec 2010 20:10:06 +0000 (20:10 +0000)
19 files changed:
compiler/basicTypes/OccName.lhs
compiler/basicTypes/UniqSupply.lhs
compiler/cmm/CmmBuildInfoTables.hs
compiler/cmm/CmmCPSZ.hs
compiler/cmm/CmmSpillReload.hs
compiler/cmm/CmmStackLayout.hs
compiler/cmm/ZipCfgCmmRep.hs
compiler/ghci/RtClosureInspect.hs
compiler/main/BreakArray.hs
compiler/parser/cutils.c
compiler/utils/Binary.hs
compiler/utils/Digraph.lhs
compiler/utils/FastFunctions.lhs
compiler/utils/FastMutInt.lhs
compiler/utils/FastString.lhs
compiler/utils/Serialized.hs
compiler/utils/UniqFM.lhs
compiler/utils/Util.lhs
compiler/vectorise/Vectorise/Type/Env.hs

index 9ff53f1..439a2f8 100644 (file)
@@ -107,16 +107,6 @@ import Data.Char
 import Data.Data
 \end{code}
 
 import Data.Data
 \end{code}
 
-\begin{code}
--- Unicode TODO: put isSymbol in libcompat
-#if !defined(__GLASGOW_HASKELL__) || __GLASGOW_HASKELL__ > 604
-#else
-isSymbol :: a -> Bool
-isSymbol = const False
-#endif
-
-\end{code}
-
 %************************************************************************
 %*                                                                     *
 \subsection{Name space}
 %************************************************************************
 %*                                                                     *
 \subsection{Name space}
index a4c16fd..493bfbe 100644 (file)
@@ -31,11 +31,7 @@ import FastTypes
 
 import MonadUtils
 import Control.Monad
 
 import MonadUtils
 import Control.Monad
-#if __GLASGOW_HASKELL__ >= 611
 import GHC.IO (unsafeDupableInterleaveIO)
 import GHC.IO (unsafeDupableInterleaveIO)
-#else
-import GHC.IOBase (unsafeDupableInterleaveIO)
-#endif
 
 \end{code}
 
 
 \end{code}
 
index 0778e7c..4e3879f 100644 (file)
@@ -1,6 +1,4 @@
-#if __GLASGOW_HASKELL__ >= 611
 {-# OPTIONS_GHC -XNoMonoLocalBinds #-}
 {-# OPTIONS_GHC -XNoMonoLocalBinds #-}
-#endif
 -- Norman likes local bindings
 -- If this module lives on I'd like to get rid of this flag in due course
 
 -- Norman likes local bindings
 -- If this module lives on I'd like to get rid of this flag in due course
 
index d74da69..23e57d7 100644 (file)
@@ -1,6 +1,4 @@
-#if __GLASGOW_HASKELL__ >= 611
 {-# OPTIONS_GHC -XNoMonoLocalBinds #-}
 {-# OPTIONS_GHC -XNoMonoLocalBinds #-}
-#endif
 -- Norman likes local bindings
 -- If this module lives on I'd like to get rid of this flag in due course
 
 -- Norman likes local bindings
 -- If this module lives on I'd like to get rid of this flag in due course
 
index a8839a8..c457383 100644 (file)
@@ -1,6 +1,4 @@
-#if __GLASGOW_HASKELL__ >= 611
 {-# OPTIONS_GHC -XNoMonoLocalBinds #-}
 {-# OPTIONS_GHC -XNoMonoLocalBinds #-}
-#endif
 -- Norman likes local bindings
 -- If this module lives on I'd like to get rid of this flag in due course
 
 -- Norman likes local bindings
 -- If this module lives on I'd like to get rid of this flag in due course
 
index 847019c..df1b89c 100644 (file)
@@ -1,6 +1,4 @@
-#if __GLASGOW_HASKELL__ >= 611
 {-# OPTIONS_GHC -XNoMonoLocalBinds #-}
 {-# OPTIONS_GHC -XNoMonoLocalBinds #-}
-#endif
 -- Norman likes local bindings
 -- If this module lives on I'd like to get rid of this flag in due course
 
 -- Norman likes local bindings
 -- If this module lives on I'd like to get rid of this flag in due course
 
index aa16f0b..0f00641 100644 (file)
@@ -1,6 +1,4 @@
-#if __GLASGOW_HASKELL__ >= 611
 {-# OPTIONS_GHC -XNoMonoLocalBinds #-}
 {-# OPTIONS_GHC -XNoMonoLocalBinds #-}
-#endif
 -- Norman likes local bindings
 
 -- This module is pure representation and should be imported only by
 -- Norman likes local bindings
 
 -- This module is pure representation and should be imported only by
index 5d74dc9..597a9a7 100644 (file)
@@ -59,12 +59,7 @@ import Constants        ( wORD_SIZE )
 
 import GHC.Arr          ( Array(..) )
 import GHC.Exts
 
 import GHC.Arr          ( Array(..) )
 import GHC.Exts
-
-#if __GLASGOW_HASKELL__ >= 611
 import GHC.IO ( IO(..) )
 import GHC.IO ( IO(..) )
-#else
-import GHC.IOBase ( IO(..) )
-#endif
 
 import Control.Monad
 import Data.Maybe
 
 import Control.Monad
 import Data.Maybe
index 2d1a4d4..4d2c07b 100644 (file)
@@ -26,11 +26,7 @@ module BreakArray
   ) where
 #ifdef GHCI
 import GHC.Exts
   ) where
 #ifdef GHCI
 import GHC.Exts
-#if __GLASGOW_HASKELL__ >= 611
 import GHC.IO ( IO(..) )
 import GHC.IO ( IO(..) )
-#else
-import GHC.IOBase ( IO(..) )
-#endif
 import Constants
 
 data BreakArray = BA (MutableByteArray# RealWorld)
 import Constants
 
 data BreakArray = BA (MutableByteArray# RealWorld)
index 157c902..c42ec9e 100644 (file)
@@ -4,9 +4,6 @@ places in the GHC library.
 */
 
 #include "Rts.h"
 */
 
 #include "Rts.h"
-#if __GLASGOW_HASKELL__ <= 610
-#include "RtsFlags.h"
-#endif
 
 #include "HsFFI.h"
 
 
 #include "HsFFI.h"
 
index 249480a..3785957 100644 (file)
@@ -81,12 +81,7 @@ import System.IO.Error          ( mkIOError, eofErrorType )
 import GHC.Real                 ( Ratio(..) )
 import GHC.Exts
 import GHC.Word                 ( Word8(..) )
 import GHC.Real                 ( Ratio(..) )
 import GHC.Exts
 import GHC.Word                 ( Word8(..) )
-
-#if __GLASGOW_HASKELL__ >= 611
 import GHC.IO ( IO(..) )
 import GHC.IO ( IO(..) )
-#else
-import GHC.IOBase ( IO(..) )
-#endif
 
 type BinArray = ForeignPtr Word8
 
 
 type BinArray = ForeignPtr Word8
 
index 2ed3933..a341bde 100644 (file)
@@ -50,12 +50,7 @@ import Control.Monad.ST
 import Data.Maybe
 import Data.Array
 import Data.List   ( (\\) )
 import Data.Maybe
 import Data.Array
 import Data.List   ( (\\) )
-
-#if !defined(__GLASGOW_HASKELL__) || __GLASGOW_HASKELL__ > 604
 import Data.Array.ST
 import Data.Array.ST
-#else
-import Data.Array.ST  hiding ( indices, bounds )
-#endif
 \end{code}
 
 %************************************************************************
 \end{code}
 
 %************************************************************************
index d6a282f..5496ed0 100644 (file)
@@ -22,19 +22,7 @@ import System.IO.Unsafe
 
 import GHC.Exts
 import GHC.Word
 
 import GHC.Exts
 import GHC.Word
-
-#if __GLASGOW_HASKELL__ >= 611
-import GHC.IO ( IO(..) )
-#else
-import GHC.IOBase ( IO(..) )
-#endif
-
-#if __GLASGOW_HASKELL__ >= 611
-import GHC.IO (unsafeDupableInterleaveIO)
-#else
-import GHC.IOBase (unsafeDupableInterleaveIO)
-#endif
-
+import GHC.IO (IO(..), unsafeDupableInterleaveIO)
 import GHC.Base (unsafeChr)
 
 -- Just like unsafePerformIO, but we inline it.
 import GHC.Base (unsafeChr)
 
 -- Just like unsafePerformIO, but we inline it.
index 61e3e85..2618307 100644 (file)
@@ -28,12 +28,6 @@ module FastMutInt(
 import GHC.Base
 import GHC.Ptr
 
 import GHC.Base
 import GHC.Ptr
 
-#if __GLASGOW_HASKELL__ >= 611
--- import GHC.IO ( IO(..) )
-#else
-import GHC.IOBase ( IO(..) )
-#endif
-
 #else /* ! __GLASGOW_HASKELL__ */
 
 import Data.IORef
 #else /* ! __GLASGOW_HASKELL__ */
 
 import Data.IORef
index dafdf6a..c6dac8f 100644 (file)
@@ -106,11 +106,7 @@ import Data.IORef       ( IORef, newIORef, readIORef, writeIORef )
 import Data.Maybe       ( isJust )
 import Data.Char        ( ord )
 
 import Data.Maybe       ( isJust )
 import Data.Char        ( ord )
 
-#if __GLASGOW_HASKELL__ >= 611
 import GHC.IO ( IO(..) )
 import GHC.IO ( IO(..) )
-#else
-import GHC.IOBase ( IO(..) )
-#endif
 
 import GHC.Ptr          ( Ptr(..) )
 #if defined(__GLASGOW_HASKELL__)
 
 import GHC.Ptr          ( Ptr(..) )
 #if defined(__GLASGOW_HASKELL__)
index 95a09b9..26cca6c 100644 (file)
@@ -82,11 +82,7 @@ serializeConstr :: ConstrRep -> [Word8] -> [Word8]
 serializeConstr (AlgConstr ix)   = serializeWord8 1 . serializeInt ix
 serializeConstr (IntConstr i)    = serializeWord8 2 . serializeInteger i
 serializeConstr (FloatConstr r)  = serializeWord8 3 . serializeRational r
 serializeConstr (AlgConstr ix)   = serializeWord8 1 . serializeInt ix
 serializeConstr (IntConstr i)    = serializeWord8 2 . serializeInteger i
 serializeConstr (FloatConstr r)  = serializeWord8 3 . serializeRational r
-#if __GLASGOW_HASKELL__ < 611
-serializeConstr (StringConstr s) = serializeWord8 4 . serializeString s
-#else
 serializeConstr (CharConstr c)   = serializeWord8 4 . serializeChar c
 serializeConstr (CharConstr c)   = serializeWord8 4 . serializeChar c
-#endif
 
 
 deserializeConstr :: [Word8] -> (ConstrRep -> [Word8] -> a) -> a
 
 
 deserializeConstr :: [Word8] -> (ConstrRep -> [Word8] -> a) -> a
@@ -95,11 +91,7 @@ deserializeConstr bytes k = deserializeWord8 bytes $ \constr_ix bytes ->
                                 1 -> deserializeInt      bytes $ \ix -> k (AlgConstr ix)
                                 2 -> deserializeInteger  bytes $ \i  -> k (IntConstr i)
                                 3 -> deserializeRational bytes $ \r  -> k (FloatConstr r)
                                 1 -> deserializeInt      bytes $ \ix -> k (AlgConstr ix)
                                 2 -> deserializeInteger  bytes $ \i  -> k (IntConstr i)
                                 3 -> deserializeRational bytes $ \r  -> k (FloatConstr r)
-#if __GLASGOW_HASKELL__ >= 611
                                 4 -> deserializeChar     bytes $ \c  -> k (CharConstr c)
                                 4 -> deserializeChar     bytes $ \c  -> k (CharConstr c)
-#else
-                                4 -> deserializeString   bytes $ \s  -> k (StringConstr s)
-#endif
                                 x -> error $ "deserializeConstr: unrecognised serialized constructor type " ++ show x ++ " in context " ++ show bytes
 
 
                                 x -> error $ "deserializeConstr: unrecognised serialized constructor type " ++ show x ++ " in context " ++ show bytes
 
 
@@ -158,13 +150,11 @@ deserializeInteger :: [Word8] -> (Integer -> [Word8] -> a) -> a
 deserializeInteger bytes k = deserializeString bytes (k . read)
 
 
 deserializeInteger bytes k = deserializeString bytes (k . read)
 
 
-#if __GLASGOW_HASKELL__ >= 611
 serializeChar :: Char -> [Word8] -> [Word8]
 serializeChar = serializeString . show
 
 deserializeChar :: [Word8] -> (Char -> [Word8] -> a) -> a
 deserializeChar bytes k = deserializeString bytes (k . read)
 serializeChar :: Char -> [Word8] -> [Word8]
 serializeChar = serializeString . show
 
 deserializeChar :: [Word8] -> (Char -> [Word8] -> a) -> a
 deserializeChar bytes k = deserializeString bytes (k . read)
-#endif
 
 
 serializeString :: String -> [Word8] -> [Word8]
 
 
 serializeString :: String -> [Word8] -> [Word8]
index 19b1428..293e48e 100644 (file)
@@ -183,20 +183,7 @@ plusUFM (UFM x) (UFM y) = UFM (M.union y x)
 plusUFM_C f (UFM x) (UFM y) = UFM (M.unionWith f x y)
 minusUFM (UFM x) (UFM y) = UFM (M.difference x y)
 intersectUFM (UFM x) (UFM y) = UFM (M.intersection x y)
 plusUFM_C f (UFM x) (UFM y) = UFM (M.unionWith f x y)
 minusUFM (UFM x) (UFM y) = UFM (M.difference x y)
 intersectUFM (UFM x) (UFM y) = UFM (M.intersection x y)
-#if __GLASGOW_HASKELL__ >= 611
 intersectUFM_C f (UFM x) (UFM y) = UFM (M.intersectionWith f x y)
 intersectUFM_C f (UFM x) (UFM y) = UFM (M.intersectionWith f x y)
-#else
--- In GHC 6.10, intersectionWith is (a -> b -> a) instead of (a -> b -> c),
--- so we need to jump through some hoops to get the more general type.
-intersectUFM_C f (UFM x) (UFM y) = UFM z
-    where z = let x' = M.map Left x
-                  f' (Left a) b = Right (f a b)
-                  f' (Right _) _ = panic "intersectUFM_C: f': Right"
-                  z' = M.intersectionWith f' x' y
-                  fromRight (Right a) = a
-                  fromRight _ = panic "intersectUFM_C: Left"
-              in M.map fromRight z'
-#endif
 
 foldUFM k z (UFM m) = M.fold k z m
 foldUFM_Directly k z (UFM m) = M.foldWithKey (k . getUnique) z m
 
 foldUFM k z (UFM m) = M.fold k z m
 foldUFM_Directly k z (UFM m) = M.foldWithKey (k . getUnique) z m
index e019f67..55a1a4f 100644 (file)
@@ -1019,11 +1019,3 @@ abstractDataType :: String -> DataType
 abstractDataType n = mkDataType n [abstractConstr n]
 \end{code}
 
 abstractDataType n = mkDataType n [abstractConstr n]
 \end{code}
 
-\begin{code}
--- Old GHC versions come with a base library with this function misspelled.
-#if __GLASGOW_HASKELL__ < 612
-mkNoRepType :: String -> DataType
-mkNoRepType = mkNorepType
-#endif
-\end{code}
-
index 43ff97c..99c1746 100644 (file)
@@ -1,7 +1,5 @@
 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
-#if __GLASGOW_HASKELL__ >= 611
 {-# OPTIONS_GHC -XNoMonoLocalBinds #-}
 {-# OPTIONS_GHC -XNoMonoLocalBinds #-}
-#endif
 -- Roman likes local bindings
 -- If this module lives on I'd like to get rid of this flag in due course
 
 -- Roman likes local bindings
 -- If this module lives on I'd like to get rid of this flag in due course