summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/basicTypes/OccName.lhs10
-rw-r--r--compiler/basicTypes/UniqSupply.lhs4
-rw-r--r--compiler/cmm/CmmBuildInfoTables.hs2
-rw-r--r--compiler/cmm/CmmCPSZ.hs2
-rw-r--r--compiler/cmm/CmmSpillReload.hs2
-rw-r--r--compiler/cmm/CmmStackLayout.hs2
-rw-r--r--compiler/cmm/ZipCfgCmmRep.hs2
-rw-r--r--compiler/ghci/RtClosureInspect.hs5
-rw-r--r--compiler/main/BreakArray.hs4
-rw-r--r--compiler/parser/cutils.c3
-rw-r--r--compiler/utils/Binary.hs5
-rw-r--r--compiler/utils/Digraph.lhs5
-rw-r--r--compiler/utils/FastFunctions.lhs14
-rw-r--r--compiler/utils/FastMutInt.lhs6
-rw-r--r--compiler/utils/FastString.lhs4
-rw-r--r--compiler/utils/Serialized.hs10
-rw-r--r--compiler/utils/UniqFM.lhs13
-rw-r--r--compiler/utils/Util.lhs8
-rw-r--r--compiler/vectorise/Vectorise/Type/Env.hs2
19 files changed, 1 insertions, 102 deletions
diff --git a/compiler/basicTypes/OccName.lhs b/compiler/basicTypes/OccName.lhs
index 9ff53f1340..439a2f8831 100644
--- a/compiler/basicTypes/OccName.lhs
+++ b/compiler/basicTypes/OccName.lhs
@@ -107,16 +107,6 @@ import Data.Char
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}
diff --git a/compiler/basicTypes/UniqSupply.lhs b/compiler/basicTypes/UniqSupply.lhs
index a4c16fdc05..493bfbe6db 100644
--- a/compiler/basicTypes/UniqSupply.lhs
+++ b/compiler/basicTypes/UniqSupply.lhs
@@ -31,11 +31,7 @@ import FastTypes
import MonadUtils
import Control.Monad
-#if __GLASGOW_HASKELL__ >= 611
import GHC.IO (unsafeDupableInterleaveIO)
-#else
-import GHC.IOBase (unsafeDupableInterleaveIO)
-#endif
\end{code}
diff --git a/compiler/cmm/CmmBuildInfoTables.hs b/compiler/cmm/CmmBuildInfoTables.hs
index 0778e7c2d4..4e3879f6be 100644
--- a/compiler/cmm/CmmBuildInfoTables.hs
+++ b/compiler/cmm/CmmBuildInfoTables.hs
@@ -1,6 +1,4 @@
-#if __GLASGOW_HASKELL__ >= 611
{-# 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
diff --git a/compiler/cmm/CmmCPSZ.hs b/compiler/cmm/CmmCPSZ.hs
index d74da69d06..23e57d72b6 100644
--- a/compiler/cmm/CmmCPSZ.hs
+++ b/compiler/cmm/CmmCPSZ.hs
@@ -1,6 +1,4 @@
-#if __GLASGOW_HASKELL__ >= 611
{-# 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
diff --git a/compiler/cmm/CmmSpillReload.hs b/compiler/cmm/CmmSpillReload.hs
index a8839a8798..c457383e6b 100644
--- a/compiler/cmm/CmmSpillReload.hs
+++ b/compiler/cmm/CmmSpillReload.hs
@@ -1,6 +1,4 @@
-#if __GLASGOW_HASKELL__ >= 611
{-# 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
diff --git a/compiler/cmm/CmmStackLayout.hs b/compiler/cmm/CmmStackLayout.hs
index 847019c07c..df1b89c9ba 100644
--- a/compiler/cmm/CmmStackLayout.hs
+++ b/compiler/cmm/CmmStackLayout.hs
@@ -1,6 +1,4 @@
-#if __GLASGOW_HASKELL__ >= 611
{-# 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
diff --git a/compiler/cmm/ZipCfgCmmRep.hs b/compiler/cmm/ZipCfgCmmRep.hs
index aa16f0b198..0f00641efd 100644
--- a/compiler/cmm/ZipCfgCmmRep.hs
+++ b/compiler/cmm/ZipCfgCmmRep.hs
@@ -1,6 +1,4 @@
-#if __GLASGOW_HASKELL__ >= 611
{-# OPTIONS_GHC -XNoMonoLocalBinds #-}
-#endif
-- Norman likes local bindings
-- This module is pure representation and should be imported only by
diff --git a/compiler/ghci/RtClosureInspect.hs b/compiler/ghci/RtClosureInspect.hs
index 5d74dc92c2..597a9a72f8 100644
--- a/compiler/ghci/RtClosureInspect.hs
+++ b/compiler/ghci/RtClosureInspect.hs
@@ -59,12 +59,7 @@ import Constants ( wORD_SIZE )
import GHC.Arr ( Array(..) )
import GHC.Exts
-
-#if __GLASGOW_HASKELL__ >= 611
import GHC.IO ( IO(..) )
-#else
-import GHC.IOBase ( IO(..) )
-#endif
import Control.Monad
import Data.Maybe
diff --git a/compiler/main/BreakArray.hs b/compiler/main/BreakArray.hs
index 2d1a4d491f..4d2c07bba9 100644
--- a/compiler/main/BreakArray.hs
+++ b/compiler/main/BreakArray.hs
@@ -26,11 +26,7 @@ module BreakArray
) where
#ifdef GHCI
import GHC.Exts
-#if __GLASGOW_HASKELL__ >= 611
import GHC.IO ( IO(..) )
-#else
-import GHC.IOBase ( IO(..) )
-#endif
import Constants
data BreakArray = BA (MutableByteArray# RealWorld)
diff --git a/compiler/parser/cutils.c b/compiler/parser/cutils.c
index 157c90290d..c42ec9e3ce 100644
--- a/compiler/parser/cutils.c
+++ b/compiler/parser/cutils.c
@@ -4,9 +4,6 @@ places in the GHC library.
*/
#include "Rts.h"
-#if __GLASGOW_HASKELL__ <= 610
-#include "RtsFlags.h"
-#endif
#include "HsFFI.h"
diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs
index 249480afee..3785957966 100644
--- a/compiler/utils/Binary.hs
+++ b/compiler/utils/Binary.hs
@@ -81,12 +81,7 @@ import System.IO.Error ( mkIOError, eofErrorType )
import GHC.Real ( Ratio(..) )
import GHC.Exts
import GHC.Word ( Word8(..) )
-
-#if __GLASGOW_HASKELL__ >= 611
import GHC.IO ( IO(..) )
-#else
-import GHC.IOBase ( IO(..) )
-#endif
type BinArray = ForeignPtr Word8
diff --git a/compiler/utils/Digraph.lhs b/compiler/utils/Digraph.lhs
index 2ed39332c6..a341bdecbc 100644
--- a/compiler/utils/Digraph.lhs
+++ b/compiler/utils/Digraph.lhs
@@ -50,12 +50,7 @@ import Control.Monad.ST
import Data.Maybe
import Data.Array
import Data.List ( (\\) )
-
-#if !defined(__GLASGOW_HASKELL__) || __GLASGOW_HASKELL__ > 604
import Data.Array.ST
-#else
-import Data.Array.ST hiding ( indices, bounds )
-#endif
\end{code}
%************************************************************************
diff --git a/compiler/utils/FastFunctions.lhs b/compiler/utils/FastFunctions.lhs
index d6a282fcbe..5496ed051c 100644
--- a/compiler/utils/FastFunctions.lhs
+++ b/compiler/utils/FastFunctions.lhs
@@ -22,19 +22,7 @@ import System.IO.Unsafe
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.
diff --git a/compiler/utils/FastMutInt.lhs b/compiler/utils/FastMutInt.lhs
index 61e3e853ec..26183071f1 100644
--- a/compiler/utils/FastMutInt.lhs
+++ b/compiler/utils/FastMutInt.lhs
@@ -28,12 +28,6 @@ module FastMutInt(
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
diff --git a/compiler/utils/FastString.lhs b/compiler/utils/FastString.lhs
index dafdf6a837..c6dac8ff42 100644
--- a/compiler/utils/FastString.lhs
+++ b/compiler/utils/FastString.lhs
@@ -106,11 +106,7 @@ import Data.IORef ( IORef, newIORef, readIORef, writeIORef )
import Data.Maybe ( isJust )
import Data.Char ( ord )
-#if __GLASGOW_HASKELL__ >= 611
import GHC.IO ( IO(..) )
-#else
-import GHC.IOBase ( IO(..) )
-#endif
import GHC.Ptr ( Ptr(..) )
#if defined(__GLASGOW_HASKELL__)
diff --git a/compiler/utils/Serialized.hs b/compiler/utils/Serialized.hs
index 95a09b9f29..26cca6c386 100644
--- a/compiler/utils/Serialized.hs
+++ b/compiler/utils/Serialized.hs
@@ -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
-#if __GLASGOW_HASKELL__ < 611
-serializeConstr (StringConstr s) = serializeWord8 4 . serializeString s
-#else
serializeConstr (CharConstr c) = serializeWord8 4 . serializeChar c
-#endif
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)
-#if __GLASGOW_HASKELL__ >= 611
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
@@ -158,13 +150,11 @@ deserializeInteger :: [Word8] -> (Integer -> [Word8] -> a) -> a
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)
-#endif
serializeString :: String -> [Word8] -> [Word8]
diff --git a/compiler/utils/UniqFM.lhs b/compiler/utils/UniqFM.lhs
index 19b1428d90..293e48ed14 100644
--- a/compiler/utils/UniqFM.lhs
+++ b/compiler/utils/UniqFM.lhs
@@ -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)
-#if __GLASGOW_HASKELL__ >= 611
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
diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs
index e019f67ca7..55a1a4f566 100644
--- a/compiler/utils/Util.lhs
+++ b/compiler/utils/Util.lhs
@@ -1019,11 +1019,3 @@ abstractDataType :: String -> DataType
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}
-
diff --git a/compiler/vectorise/Vectorise/Type/Env.hs b/compiler/vectorise/Vectorise/Type/Env.hs
index 43ff97c69a..99c17464dd 100644
--- a/compiler/vectorise/Vectorise/Type/Env.hs
+++ b/compiler/vectorise/Vectorise/Type/Env.hs
@@ -1,7 +1,5 @@
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
-#if __GLASGOW_HASKELL__ >= 611
{-# 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