X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fiface%2FLoadIface.lhs;h=feb51d1b73d5e7cdb0a376cbf07d9ad2d847ca8c;hb=8d6bc9bf51829ea04da5f599b84114ef220f0a19;hp=3d8e498ad9c184167b5dbfc8ffb2bcffe457051e;hpb=f53056962c6d5d465001560a5b2afd8edf67517b;p=ghc-hetmet.git diff --git a/compiler/iface/LoadIface.lhs b/compiler/iface/LoadIface.lhs index 3d8e498..feb51d1 100644 --- a/compiler/iface/LoadIface.lhs +++ b/compiler/iface/LoadIface.lhs @@ -57,7 +57,10 @@ import StaticFlags import Outputable import BinIface import Panic +import Util +import FastString +import Control.Monad import Data.List import Data.Maybe import Data.IORef @@ -114,14 +117,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 @@ -625,7 +628,6 @@ pprModIface iface = vcat [ ptext SLIT("interface") <+> ppr (mi_module iface) <+> pp_boot <+> ppr (mi_mod_vers iface) <+> pp_sub_vers - <+> ppr (mi_mod_vers iface) <+> (if mi_orphan iface then ptext SLIT("[orphan module]") else empty) <+> (if mi_finsts iface then ptext SLIT("[family instance module]") else empty) <+> (if mi_hpc iface then ptext SLIT("[hpc]") else empty)