)
import NameSet
import OccName ( OccName,
- mkDFunOcc, occNameUserString,
+ mkDFunOcc, occNameUserString, occNameString,
occNameFlavour
)
import TysWiredIn ( tupleTyCon, unboxedTupleTyCon, listTyCon )
in
case lookupFM cache key of
Just name -> returnRn name
- Nothing -> setNameSupplyRn (us', inst_ns, new_cache) `thenRn_`
+ Nothing -> setNameSupplyRn (us', inst_ns, new_cache) `thenRn_`
returnRn name
where
(us', us1) = splitUniqSupply us
-- Make an imported global name, checking first to see if it's in the cache
mkImportedGlobalName :: ModuleName -> OccName -> RnM d Name
mkImportedGlobalName mod_name occ
- = newImportedGlobalName mod_name occ (mkVanillaModule mod_name)
+ = lookupModuleRn mod_name `thenRn` \ mod ->
+ newImportedGlobalName mod_name occ mod --(mkVanillaModule mod_name)
mkImportedGlobalFromRdrName rdr_name
| isQual rdr_name
\begin{code}
newDFunName :: (OccName, OccName) -> SrcLoc -> RnMS Name
newDFunName key@(cl_occ, tycon_occ) loc
- = newInstUniq key `thenRn` \ inst_uniq ->
- newImplicitBinder (mkDFunOcc cl_occ tycon_occ inst_uniq) loc
+ = newInstUniq string `thenRn` \ inst_uniq ->
+ newImplicitBinder (mkDFunOcc string inst_uniq) loc
+ where
+ -- Any string that is somewhat unique will do
+ string = occNameString cl_occ ++ occNameString tycon_occ
\end{code}
\begin{code}
returnRn (thing, delListFromNameSet fvs names)
-------------------------------------
+bindUVarRn :: SDoc -> RdrName -> (Name -> RnMS (a, FreeVars)) -> RnMS (a, FreeVars)
+bindUVarRn = bindLocalRn
+
+-------------------------------------
extendTyVarEnvFVRn :: [HsTyVar Name] -> RnMS (a, FreeVars) -> RnMS (a, FreeVars)
-- This tiresome function is used only in rnDecl on InstDecl
extendTyVarEnvFVRn tyvars enclosed_scope
$$
(ptext SLIT("in") <+> descriptor))
\end{code}
-