-- these ones must have been exported by their original module
ImportedId -> pp_full_name
PreludeId -> pp_full_name
-- these ones' exportedness checked later...
TopLevId -> pp_full_name
...
...
@@ -653,7 +645,7 @@ pprIdInUnfolding in_scopes v
pp_full_name
= let
(m_str, n_str) = moduleNamePair v
(OrigName m_str n_str) = origName "Id:ppr_Unfolding" v
pp_n =
if isLexSym n_str && not (isLexSpecialSym n_str) then
...
...
@@ -877,7 +869,7 @@ unlocaliseId mod (Id u name ty info (InstId no_ftvs))
-- type might be wrong, but it hardly matters
-- at this stage (just before printing C) ToDo
where
name = getLocalName name
name = nameOf (origName "Id.unlocaliseId" name)
full_name = mkFullName mod name InventedInThisModule ExportAll mkGeneratedSrcLoc
unlocaliseId mod other_id = Nothing
...
...
@@ -1038,42 +1030,41 @@ getInstIdModule other = panic "Id:getInstIdModule"
\begin{code}
mkSuperDictSelId u c sc ty info
= Id u n ty (SuperDictSelId c sc) NoPragmaInfo info
where
cname = getName c -- we get other info out of here
n = mkCompoundName u SLIT("sdsel") [origName cname, origName sc] cname
= mk_classy_id (SuperDictSelId c sc) SLIT("sdsel") (Left (origName "mkSuperDictSelId" sc)) u c ty info
mkMethodSelId u rec_c op ty info
= Id u n ty (MethodSelId rec_c op) NoPragmaInfo info
where
cname = getName rec_c -- we get other info out of here
n = mkCompoundName u SLIT("meth") [origName cname, Unqual (classOpString op)] cname
= mk_classy_id (MethodSelId rec_c op) SLIT("meth") (Right (classOpString op)) u rec_c ty info
mkDefaultMethodId u rec_c op gen ty info
= Id u n ty (DefaultMethodId rec_c op gen) NoPragmaInfo info
= mk_classy_id (DefaultMethodId rec_c op gen) SLIT("defm") (Right (classOpString op)) u rec_c ty info
mk_classy_id details str op_str u rec_c ty info
= Id u n ty details NoPragmaInfo info
where
cname = getName rec_c -- we get other info out of here
cname_orig = origName "mk_classy_id" cname
cmod = moduleOf cname_orig
n = mkCompoundName u SLIT("defm") [origName cname, Unqual (classOpString op)] cname
n = mkCompoundName u cmod str [Left cname_orig, op_str] cname
mkDictFunId u c ity full_ty from_here locn mod info
= Id u n full_ty (DictFunId c ity mod) NoPragmaInfo info
where
n = mkCompoundName2 u SLIT("dfun") [origName c] (getTypeString ity) from_here locn
n = mkCompoundName2 u mod SLIT("dfun") (Left (origName "mkDictFunId" c) : map Right (getTypeString ity)) from_here locn
mkConstMethodId u c op ity full_ty from_here locn mod info
= Id u n full_ty (ConstMethodId c ity op mod) NoPragmaInfo info
where
n = mkCompoundName2 u SLIT("const") [origName c, Unqual (classOpString op)] (getTypeString ity) from_here locn
n = mkCompoundName2 u mod SLIT("const") (Left (origName "mkConstMethodId" c) : Right (classOpString op) : map Right (getTypeString ity)) from_here locn