X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FUtil.lhs;h=1b2a44dea1fa5c1ad9ddee6fe80437d8bc29ee02;hb=331923fd7adec11980e776dd33442c654cca0280;hp=9bae07fc0df94683af987018e4bf5bce331c03c2;hpb=9181d6e98088505d25703b6fbd753b449ca8e5a8;p=ghc-hetmet.git diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs index 9bae07f..1b2a44d 100644 --- a/compiler/utils/Util.lhs +++ b/compiler/utils/Util.lhs @@ -6,7 +6,8 @@ \begin{code} module Util ( - debugIsOn, isWindowsHost, isWindowsTarget, isDarwinTarget, + debugIsOn, ghciTablesNextToCode, picIsOn, + isWindowsHost, isWindowsTarget, isDarwinTarget, -- general list processing zipEqual, zipWithEqual, zipWith3Equal, zipWith4Equal, @@ -93,7 +94,7 @@ import FastTypes #endif import Control.Monad ( unless ) -import SYSTEM_IO_ERROR as IO ( catch, isDoesNotExistError ) +import System.IO.Error as IO ( catch, isDoesNotExistError ) import System.Directory ( doesDirectoryExist, createDirectory, getModificationTime ) import System.FilePath hiding ( searchPathSeparator ) @@ -118,6 +119,20 @@ debugIsOn = True debugIsOn = False #endif +ghciTablesNextToCode :: Bool +#ifdef GHCI_TABLES_NEXT_TO_CODE +ghciTablesNextToCode = True +#else +ghciTablesNextToCode = False +#endif + +picIsOn :: Bool +#ifdef __PIC__ +picIsOn = True +#else +picIsOn = False +#endif + isWindowsHost :: Bool #ifdef mingw32_HOST_OS isWindowsHost = True @@ -390,16 +405,6 @@ isn'tIn msg x ys # endif /* DEBUG */ \end{code} -foldl1' was added in GHC 6.4 - -\begin{code} -#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 604 -foldl1' :: (a -> a -> a) -> [a] -> a -foldl1' f (x:xs) = foldl' f x xs -foldl1' _ [] = panic "foldl1'" -#endif -\end{code} - %************************************************************************ %* * \subsubsection[Utils-Carsten-mergesort]{A mergesort from Carsten}