in
foldlRn (loadDecl mod) (iDecls ifaces) rd_decls `thenRn` \ new_decls ->
foldlRn (loadInstDecl mod) (iInsts ifaces) (pi_insts iface) `thenRn` \ new_insts ->
- foldlRn (loadRule mod) (iRules ifaces) (pi_rules iface) `thenRn` \ new_rules ->
+ (if (opt_IgnoreIfacePragmas)
+ then returnRn emptyBag
+ else foldlRn (loadRule mod) (iRules ifaces) (pi_rules iface)) `thenRn` \ new_rules ->
foldlRn (loadFixDecl mod_name) (iFixes ifaces) rd_decls `thenRn` \ new_fixities ->
mapRn (loadExport this_mod_nm) (pi_exports iface) `thenRn` \ avails_s ->
let
case lookupNameEnv decls name of
Nothing -> -- We used it before, but it ain't there now
- putDocRn (sep [ptext SLIT("No longer exported:"), ppr name])
+ traceRn (sep [ptext SLIT("No longer exported:"), ppr name])
`thenRn_` returnRn False
Just (new_vers,_,_,_) -- It's there, but is it up to date?
| otherwise
-- Out of date, so bale out
- -> putDocRn (sep [ptext SLIT("Out of date:"), ppr name]) `thenRn_`
+ -> traceRn (sep [ptext SLIT("Out of date:"), ppr name]) `thenRn_`
returnRn False
\end{code}
other -> ppr inst_ty
getImportedRules :: RnMG [(Module,RdrNameHsDecl)]
-getImportedRules
+getImportedRules
+ | opt_IgnoreIfacePragmas = returnRn []
+ | otherwise
= getIfacesRn `thenRn` \ ifaces ->
let
gates = iSlurp ifaces -- Anything at all that's been slurped