summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Panic.lhs20
-rw-r--r--compiler/utils/Util.lhs10
2 files changed, 0 insertions, 30 deletions
diff --git a/compiler/utils/Panic.lhs b/compiler/utils/Panic.lhs
index 583174b201..23bf01cafe 100644
--- a/compiler/utils/Panic.lhs
+++ b/compiler/utils/Panic.lhs
@@ -35,9 +35,6 @@ import Exception
import Control.Concurrent
import Data.Dynamic
-#if __GLASGOW_HASKELL__ < 705
-import Data.Maybe
-#endif
import Debug.Trace ( trace )
import System.IO.Unsafe
import System.Exit
@@ -52,10 +49,7 @@ import GHC.ConsoleHandler
#endif
import GHC.Stack
-
-#if __GLASGOW_HASKELL__ >= 705
import System.Mem.Weak ( Weak, deRefWeak )
-#endif
-- | GHC's own exception type
-- error messages all take the form:
@@ -286,7 +280,6 @@ installSignalHandlers = do
return ()
#endif
-#if __GLASGOW_HASKELL__ >= 705
{-# NOINLINE interruptTargetThread #-}
interruptTargetThread :: MVar [Weak ThreadId]
interruptTargetThread = unsafePerformIO (newMVar [])
@@ -306,19 +299,6 @@ peekInterruptTargetThread =
case r of
Nothing -> loop ts
Just t -> return (Just t)
-#else
-{-# NOINLINE interruptTargetThread #-}
-interruptTargetThread :: MVar [ThreadId]
-interruptTargetThread = unsafePerformIO (newMVar [])
-
-pushInterruptTargetThread :: ThreadId -> IO ()
-pushInterruptTargetThread tid = do
- modifyMVar_ interruptTargetThread $ return . (tid :)
-
-peekInterruptTargetThread :: IO (Maybe ThreadId)
-peekInterruptTargetThread =
- withMVar interruptTargetThread $ return . listToMaybe
-#endif
popInterruptTargetThread :: IO ()
popInterruptTargetThread =
diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs
index 2dcc73fd89..dfac0ae020 100644
--- a/compiler/utils/Util.lhs
+++ b/compiler/utils/Util.lhs
@@ -129,10 +129,6 @@ import qualified Data.IntMap as IM
import qualified Data.Set as Set
import Data.Time
-#if __GLASGOW_HASKELL__ < 705
-import Data.Time.Clock.POSIX
-import System.Time
-#endif
infixr 9 `thenCmp`
\end{code}
@@ -954,13 +950,7 @@ doesDirNameExist fpath = case takeDirectory fpath of
-- Backwards compatibility definition of getModificationTime
getModificationUTCTime :: FilePath -> IO UTCTime
-#if __GLASGOW_HASKELL__ < 705
-getModificationUTCTime f = do
- TOD secs _ <- getModificationTime f
- return $ posixSecondsToUTCTime (realToFrac secs)
-#else
getModificationUTCTime = getModificationTime
-#endif
-- --------------------------------------------------------------
-- check existence & modification time at the same time