X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FUtil.lhs;h=62e2edac922781aa4ac506ebd6b9ff1bf6c7357a;hb=d78ab147ec3d8c3b06b6e922bed4cd9837c9c797;hp=217a4503c707ba226aa29c91ee9aab5904c9e5b5;hpb=e82f1baac558b855760e3011112d76397142bfc2;p=ghc-hetmet.git diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs index 217a450..62e2eda 100644 --- a/compiler/utils/Util.lhs +++ b/compiler/utils/Util.lhs @@ -6,7 +6,8 @@ \begin{code} module Util ( - debugIsOn, isWindowsHost, + 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,12 +119,40 @@ 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 #else isWindowsHost = False #endif + +isWindowsTarget :: Bool +#ifdef mingw32_TARGET_OS +isWindowsTarget = True +#else +isWindowsTarget = False +#endif + +isDarwinTarget :: Bool +#ifdef darwin_TARGET_OS +isDarwinTarget = True +#else +isDarwinTarget = False +#endif \end{code} %************************************************************************