Commit edc0bafd authored by Ian Lynagh's avatar Ian Lynagh

Remove code that is dead now that we need >= 6.12 to build

parent 4f376647
......@@ -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}
......
......@@ -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}
......
#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
......
#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
......
#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
......
#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
......
#if __GLASGOW_HASKELL__ >= 611
{-# OPTIONS_GHC -XNoMonoLocalBinds #-}
#endif
-- Norman likes local bindings
-- This module is pure representation and should be imported only by
......
......@@ -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
......
......@@ -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)
......
......@@ -4,9 +4,6 @@ places in the GHC library.
*/
#include "Rts.h"
#if __GLASGOW_HASKELL__ <= 610
#include "RtsFlags.h"
#endif
#include "HsFFI.h"
......
......@@ -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
......
......@@ -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}
%************************************************************************
......
......@@ -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.
......
......@@ -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
......
......@@ -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__)
......
......@@ -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]
......
......@@ -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
......
......@@ -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}
{-# 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment