X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FUtil.lhs;h=82e039305afc2602027029c43b141fe0b10c56cc;hb=0f5e104c36b1dc3d8deeec5fef3d65e7b3a1b5ad;hp=8cfdf839819a30da11e10e7d8aecce331d406f88;hpb=8e3f4465c2a85e6328df52939c9e2429dc63aaca;p=ghc-hetmet.git diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs index 8cfdf83..82e0393 100644 --- a/compiler/utils/Util.lhs +++ b/compiler/utils/Util.lhs @@ -6,7 +6,8 @@ \begin{code} module Util ( - debugIsOn, + debugIsOn, ghciTablesNextToCode, picIsOn, + isWindowsHost, isWindowsTarget, isDarwinTarget, -- general list processing zipEqual, zipWithEqual, zipWith3Equal, zipWith4Equal, @@ -106,7 +107,7 @@ infixr 9 `thenCmp` %************************************************************************ %* * -\subsection{-DDEBUG} +\subsection{Is DEBUG on, are we on Windows?} %* * %************************************************************************ @@ -117,6 +118,41 @@ debugIsOn = True #else 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} %************************************************************************