summaryrefslogtreecommitdiff
path: root/compiler/utils/Util.lhs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-11-05 01:23:50 +0000
committerIan Lynagh <igloo@earth.li>2011-11-05 13:46:35 +0000
commit5fc9ac61dfb66537d78ceb01b6e460a8ccfbf4b9 (patch)
tree650d914edd89e2ab260139d6e8a7218a7f186264 /compiler/utils/Util.lhs
parent676a204efbf97747350c5792953ee4b58ae6f852 (diff)
downloadhaskell-5fc9ac61dfb66537d78ceb01b6e460a8ccfbf4b9.tar.gz
Fix bitrotted NCG_DEBUG code, and switch to using a Haskell conditional
Diffstat (limited to 'compiler/utils/Util.lhs')
-rw-r--r--compiler/utils/Util.lhs10
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs
index 5fa4691113..0720eae113 100644
--- a/compiler/utils/Util.lhs
+++ b/compiler/utils/Util.lhs
@@ -14,7 +14,8 @@
-- | Highly random utility functions
module Util (
-- * Flags dependent on the compiler build
- ghciSupported, debugIsOn, ghciTablesNextToCode, isDynamicGhcLib,
+ ghciSupported, debugIsOn, ncgDebugIsOn,
+ ghciTablesNextToCode, isDynamicGhcLib,
isWindowsHost, isWindowsTarget, isDarwinTarget,
-- * General list processing
@@ -160,6 +161,13 @@ debugIsOn = True
debugIsOn = False
#endif
+ncgDebugIsOn :: Bool
+#ifdef NCG_DEBUG
+ncgDebugIsOn = True
+#else
+ncgDebugIsOn = False
+#endif
+
ghciTablesNextToCode :: Bool
#ifdef GHCI_TABLES_NEXT_TO_CODE
ghciTablesNextToCode = True