import HsSyn
import RdrHsSyn ( RdrNameHsModule(..), RdrNameImportDecl(..) )
-import RnHsSyn ( RnName, RenamedHsModule(..), isRnTyConOrClass, isRnWired )
+import RnHsSyn ( RnName(..){-.. is for Ix hack only-}, RenamedHsModule(..), isRnTyConOrClass, isRnWired )
--ToDo:rm: all for debugging only
import Maybes
import Name ( isLocallyDefined, mkBuiltinName, Name, RdrName(..) )
import PrelInfo ( builtinNameInfo, BuiltinNames(..), BuiltinKeys(..) )
import PrelMods ( pRELUDE )
+import Unique ( ixClassKey )
import UniqFM ( emptyUFM, lookupUFM, addListToUFM_C, eltsUFM )
import UniqSupply ( splitUniqSupply )
import Util ( panic, assertPanic )
\end{code}
ToDo: May want to arrange to return old interface for this module!
-ToDo: Builtin names which must be read.
ToDo: Deal with instances (instance version, this module on instance list ???)
\begin{code}
pair_orig rn = (origName rn, rn)
- -- we must ensure that the definitions of things in the BuiltinKey
- -- table which may be *required* by the typechecker etc are read.
-
must_haves
- = [ name_fn (mkBuiltinName u pRELUDE str)
- | (str, (u, name_fn)) <- fmToList b_keys,
+ = [ name_fn (mkBuiltinName u mod str)
+ | ((str, mod), (u, name_fn)) <- fmToList b_keys,
str `notElem` [ SLIT("main"), SLIT("mainPrimIO")] ]
in
- ASSERT (isEmptyBag orig_occ_dups)
+-- ASSERT (isEmptyBag orig_occ_dups)
+ (if (isEmptyBag orig_occ_dups) then \x->x
+ else pprTrace "orig_occ_dups:" (ppAboves [ ppCat [ppr PprDebug m, ppr PprDebug n, ppr PprDebug o] | (m,n,o) <- bagToList orig_occ_dups])) $
ASSERT (isEmptyBag orig_def_dups)
rnIfaces iface_cache imp_mods us3 orig_def_env orig_occ_env
\begin{code}
{- TESTING:
-pprPIface (ParsedIface m ?? v mv usgs lcm exm ims lfx ltdm lvdm lids ldp)
+pprPIface (ParsedIface m ms v mv usgs lcm exm ims lfx ltdm lvdm lids ldp)
= ppAboves [
ppCat [ppPStr SLIT("interface"), ppPStr m, ppInt v,
case mv of { Nothing -> ppNil; Just n -> ppInt n }],