From 9b2a5189130a54e30e8e513e99807e27793dce4a Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sat, 29 Mar 2008 17:09:35 +0000 Subject: [PATCH] DEBUG removal --- compiler/iface/LoadIface.lhs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/compiler/iface/LoadIface.lhs b/compiler/iface/LoadIface.lhs index 7401eeb..6211176 100644 --- a/compiler/iface/LoadIface.lhs +++ b/compiler/iface/LoadIface.lhs @@ -57,7 +57,9 @@ import StaticFlags import Outputable import BinIface import Panic +import Util +import Control.Monad import Data.List import Data.Maybe import Data.IORef @@ -114,14 +116,14 @@ loadOrphanModules mods isFamInstMod -- | Loads the interface for a given Name. loadInterfaceForName :: SDoc -> Name -> TcRn ModIface loadInterfaceForName doc name - = do { -#ifdef DEBUG - -- Should not be called with a name from the module being compiled - this_mod <- getModule - ; ASSERT2( not (nameIsLocalOrFrom this_mod name), ppr name <+> parens doc ) -#endif - initIfaceTcRn $ loadSysInterface doc (nameModule name) - } + = do { + when debugIsOn $ do + -- Should not be called with a name from the module being compiled + { this_mod <- getModule + ; MASSERT2( not (nameIsLocalOrFrom this_mod name), ppr name <+> parens doc ) + } + ; initIfaceTcRn $ loadSysInterface doc (nameModule name) + } -- | An 'IfM' function to load the home interface for a wired-in thing, -- so that we're sure that we see its instance declarations and rules -- 1.7.10.4