summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2014-10-07 08:48:06 -0500
committerAustin Seipp <austin@well-typed.com>2014-10-07 08:48:07 -0500
commitb3e5a7b50428edc07d11ef4db316c20029f7a3df (patch)
tree3b4d7e1be9c25581ae7ff0245f721eabd148f459
parent460eebec65811c6a7bbe11645df322dda868e80d (diff)
downloadhaskell-b3e5a7b50428edc07d11ef4db316c20029f7a3df.tar.gz
Delete __GLASGOW_HASKELL__ ifdefs for stage0 < 7.6.
Summary: My understanding is that ghc 7.10 should be buildable with the last 3 versions of ghc, i.e 7.6, 7.8 and 7.10 itself. Test Plan: x Reviewers: austin Reviewed By: austin Subscribers: hvr, simonmar, ezyang, carter, thomie Differential Revision: https://phabricator.haskell.org/D254
-rw-r--r--ghc/hschooks.c4
-rw-r--r--libraries/base/tests/enum01.hs3
-rw-r--r--libraries/base/tests/enum02.hs3
-rw-r--r--libraries/base/tests/enum03.hs3
-rw-r--r--libraries/base/tests/list001.hs3
-rw-r--r--testsuite/tests/arityanal/Main.hs19
-rw-r--r--testsuite/tests/concurrent/should_run/conc024.hs3
-rw-r--r--testsuite/tests/concurrent/should_run/conc029.hs3
-rw-r--r--testsuite/tests/concurrent/should_run/conc030.hs3
-rw-r--r--testsuite/tests/concurrent/should_run/conc034.hs4
-rw-r--r--testsuite/tests/concurrent/should_run/foreignInterruptible.hs3
-rw-r--r--testsuite/tests/driver/T2464.hs3
-rw-r--r--testsuite/tests/dynlibs/T4464B.c4
-rw-r--r--testsuite/tests/ghci.debugger/HappyTest.hs10
-rw-r--r--testsuite/tests/numeric/should_run/T7014.hs3
-rw-r--r--testsuite/tests/rts/testblockalloc.c4
16 files changed, 0 insertions, 75 deletions
diff --git a/ghc/hschooks.c b/ghc/hschooks.c
index 4c588d0ef7..67cdd57ab9 100644
--- a/ghc/hschooks.c
+++ b/ghc/hschooks.c
@@ -45,11 +45,7 @@ defaultsHook (void)
// See #3408: the default idle GC time of 0.3s is too short on
// Windows where we receive console events once per second or so.
-#if __GLASGOW_HASKELL__ >= 703
RtsFlags.GcFlags.idleGCDelayTime = SecondsToTime(5);
-#else
- RtsFlags.GcFlags.idleGCDelayTime = 5*1000;
-#endif
}
void
diff --git a/libraries/base/tests/enum01.hs b/libraries/base/tests/enum01.hs
index 8b490bb549..0f261732b6 100644
--- a/libraries/base/tests/enum01.hs
+++ b/libraries/base/tests/enum01.hs
@@ -3,9 +3,6 @@
module Main(main) where
import Control.Exception
-#if __GLASGOW_HASKELL__ < 705
-import Prelude hiding (catch)
-#endif
import Data.Char
import Data.Ratio
diff --git a/libraries/base/tests/enum02.hs b/libraries/base/tests/enum02.hs
index 95812e592d..23de6ebdf9 100644
--- a/libraries/base/tests/enum02.hs
+++ b/libraries/base/tests/enum02.hs
@@ -3,9 +3,6 @@
module Main(main) where
import Control.Exception
-#if __GLASGOW_HASKELL__ < 705
-import Prelude hiding (catch)
-#endif
import Data.Int
main = do
diff --git a/libraries/base/tests/enum03.hs b/libraries/base/tests/enum03.hs
index 9f730a9aa1..1cbe3091ea 100644
--- a/libraries/base/tests/enum03.hs
+++ b/libraries/base/tests/enum03.hs
@@ -2,9 +2,6 @@
{-# LANGUAGE CPP #-}
module Main(main) where
-#if __GLASGOW_HASKELL__ < 705
-import Prelude hiding (catch)
-#endif
import Control.Exception
import Data.Word
import Data.Int
diff --git a/libraries/base/tests/list001.hs b/libraries/base/tests/list001.hs
index cec5f9940e..a2a39dd86d 100644
--- a/libraries/base/tests/list001.hs
+++ b/libraries/base/tests/list001.hs
@@ -3,9 +3,6 @@ module Main where
import Data.List
import Control.Exception
-#if __GLASGOW_HASKELL__ < 705
-import Prelude hiding (catch)
-#endif
-- This module briefly tests all the functions in PrelList and a few
-- from List.
diff --git a/testsuite/tests/arityanal/Main.hs b/testsuite/tests/arityanal/Main.hs
index 25419fbc65..5c0bf897e7 100644
--- a/testsuite/tests/arityanal/Main.hs
+++ b/testsuite/tests/arityanal/Main.hs
@@ -9,19 +9,10 @@ import Control.Monad.ST
import Control.Monad (when)
import Data.STRef
import GHC.ST
-#if __GLASGOW_HASKELL__ >= 503
import Data.Array
import Data.Char (ord)
import Data.Array.Base (unsafeAt)
-#else
-import Array
-import Char (ord)
-#endif
-#if __GLASGOW_HASKELL__ >= 503
import GHC.Exts
-#else
-import GlaExts
-#endif
alex_base :: AlexAddr
alex_base = AlexA# "\xf8\xff\xfd\xff\x02\x00\x4c\x00"#
@@ -185,19 +176,9 @@ data AlexAddr = AlexA# Addr#
{-# INLINE alexIndexShortOffAddr #-}
alexIndexShortOffAddr (AlexA# arr) off =
-#if __GLASGOW_HASKELL__ > 500
narrow16Int# i
-#elif __GLASGOW_HASKELL__ == 500
- intToInt16# i
-#else
- (i `iShiftL#` 16#) `iShiftRA#` 16#
-#endif
where
-#if __GLASGOW_HASKELL__ >= 503
i = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)
-#else
- i = word2Int# ((high `shiftL#` 8#) `or#` low)
-#endif
high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))
low = int2Word# (ord# (indexCharOffAddr# arr off'))
off' = off *# 2#
diff --git a/testsuite/tests/concurrent/should_run/conc024.hs b/testsuite/tests/concurrent/should_run/conc024.hs
index c1410828fa..9a82320e73 100644
--- a/testsuite/tests/concurrent/should_run/conc024.hs
+++ b/testsuite/tests/concurrent/should_run/conc024.hs
@@ -3,9 +3,6 @@ module Main where
import Control.Exception
import Control.Concurrent
-#if __GLASGOW_HASKELL__ < 705
-import Prelude hiding (catch)
-#endif
import System.Mem
-- illustrates the BlockOnDeadMVar exception
diff --git a/testsuite/tests/concurrent/should_run/conc029.hs b/testsuite/tests/concurrent/should_run/conc029.hs
index ceca99d2dc..cca4ccfe1d 100644
--- a/testsuite/tests/concurrent/should_run/conc029.hs
+++ b/testsuite/tests/concurrent/should_run/conc029.hs
@@ -3,9 +3,6 @@ module Main where
import Control.Exception
import Control.Concurrent
-#if __GLASGOW_HASKELL__ < 705
-import Prelude hiding (catch)
-#endif
-- the BlockOnDeadMVar exception doesn't cause any output by default
diff --git a/testsuite/tests/concurrent/should_run/conc030.hs b/testsuite/tests/concurrent/should_run/conc030.hs
index 658feb322a..b2f439cafe 100644
--- a/testsuite/tests/concurrent/should_run/conc030.hs
+++ b/testsuite/tests/concurrent/should_run/conc030.hs
@@ -3,9 +3,6 @@ module Main where
import Control.Exception
import Control.Concurrent
-#if __GLASGOW_HASKELL__ < 705
-import Prelude hiding (catch)
-#endif
-- the ThreadKilled exception doesn't cause any output by default
diff --git a/testsuite/tests/concurrent/should_run/conc034.hs b/testsuite/tests/concurrent/should_run/conc034.hs
index 993b961680..85852d6532 100644
--- a/testsuite/tests/concurrent/should_run/conc034.hs
+++ b/testsuite/tests/concurrent/should_run/conc034.hs
@@ -5,10 +5,6 @@ import Foreign
import System.IO (hFlush,stdout)
-#if __GLASGOW_HASKELL__ < 705
-import Prelude hiding (catch)
-#endif
-
-- !!! Try to get two threads into a knot depending on each other.
-- This should result in the main thread being sent a NonTermination
diff --git a/testsuite/tests/concurrent/should_run/foreignInterruptible.hs b/testsuite/tests/concurrent/should_run/foreignInterruptible.hs
index 52da549380..73585ec43b 100644
--- a/testsuite/tests/concurrent/should_run/foreignInterruptible.hs
+++ b/testsuite/tests/concurrent/should_run/foreignInterruptible.hs
@@ -3,9 +3,6 @@ module Main where
import Control.Concurrent
import Control.Exception
-#if __GLASGOW_HASKELL__ < 705
-import Prelude hiding (catch)
-#endif
import Foreign
import System.IO
diff --git a/testsuite/tests/driver/T2464.hs b/testsuite/tests/driver/T2464.hs
index 3547c100fb..6bee708e4b 100644
--- a/testsuite/tests/driver/T2464.hs
+++ b/testsuite/tests/driver/T2464.hs
@@ -4,9 +4,6 @@
#ifdef TEST
{-# LANGUAGE EmptyDataDecls #-}
#endif
-#if __GLASGOW_HASKELL__ < 610
-{-# INCLUDE "foo.h" #-} -- would generate a deprecation warning if enabled
-#endif
module Test2464 where
data T
diff --git a/testsuite/tests/dynlibs/T4464B.c b/testsuite/tests/dynlibs/T4464B.c
index 310b75a58d..c8fd84580b 100644
--- a/testsuite/tests/dynlibs/T4464B.c
+++ b/testsuite/tests/dynlibs/T4464B.c
@@ -7,16 +7,12 @@ void HsStart(void) {
// Initialize Haskell runtime
char** args = argv;
-#if __GLASGOW_HASKELL__ >= 703
{
RtsConfig conf = defaultRtsConfig;
conf.rts_opts_enabled = RTSOPTS; // RTSOPTS defined on the
// command line with -DRTSOPTS=...
hs_init_ghc(&argc, &args, conf);
}
-#else
- hs_init(&argc, &args);
-#endif
}
void HsEnd(void) {
diff --git a/testsuite/tests/ghci.debugger/HappyTest.hs b/testsuite/tests/ghci.debugger/HappyTest.hs
index 02c6a96e2a..8eac4e714f 100644
--- a/testsuite/tests/ghci.debugger/HappyTest.hs
+++ b/testsuite/tests/ghci.debugger/HappyTest.hs
@@ -345,19 +345,9 @@ happyDoAction i tk st
indexShortOffAddr (HappyA# arr) off =
-#if __GLASGOW_HASKELL__ > 500
narrow16Int# i
-#elif __GLASGOW_HASKELL__ == 500
- intToInt16# i
-#else
- (i `iShiftL#` 16#) `iShiftRA#` 16#
-#endif
where
-#if __GLASGOW_HASKELL__ >= 503
i = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)
-#else
- i = word2Int# ((high `shiftL#` 8#) `or#` low)
-#endif
high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))
low = int2Word# (ord# (indexCharOffAddr# arr off'))
off' = off *# 2#
diff --git a/testsuite/tests/numeric/should_run/T7014.hs b/testsuite/tests/numeric/should_run/T7014.hs
index 222b33bd59..e02264d105 100644
--- a/testsuite/tests/numeric/should_run/T7014.hs
+++ b/testsuite/tests/numeric/should_run/T7014.hs
@@ -3,9 +3,6 @@
module Main where
import Data.Bits
-#if __GLASGOW_HASKELL__ < 705
-import Data.Word (Word)
-#endif
test_and1 :: Word -> Word
test_and1 x = x .&. 0
diff --git a/testsuite/tests/rts/testblockalloc.c b/testsuite/tests/rts/testblockalloc.c
index 7fd14b6b18..b49ae00bac 100644
--- a/testsuite/tests/rts/testblockalloc.c
+++ b/testsuite/tests/rts/testblockalloc.c
@@ -21,15 +21,11 @@ int main (int argc, char *argv[])
srand(SEED);
-#if __GLASGOW_HASKELL__ >= 703
{
RtsConfig conf = defaultRtsConfig;
conf.rts_opts_enabled = RtsOptsAll;
hs_init_ghc(&argc, &argv, conf);
}
-#else
- hs_init(&argc, &argv);
-#endif
// repeatedly sweep though the array, allocating new random-sized
// objects and deallocating the old ones.