Commit b3e5a7b5 authored by thomie's avatar thomie Committed by Austin Seipp

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
parent 460eebec
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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.
......
......@@ -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#
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......@@ -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) {
......
......@@ -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#
......
......@@ -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
......
......@@ -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.
......
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