Commit 9c8f079e authored by sof's avatar sof
Browse files

[project @ 2002-01-18 06:44:33 by sof]

added isHomePackageThing :: NamedThing a => a -> Bool
parent 146687a5
......@@ -33,7 +33,7 @@ module TcEnv(
newLocalName, newDFunName,
-- Misc
isLocalThing, tcSetEnv
isLocalThing, isHomePackageThing, tcSetEnv
) where
#include "HsVersions.h"
......@@ -53,7 +53,8 @@ import DataCon ( DataCon )
import TyCon ( TyCon )
import Class ( Class, ClassOpItem )
import Name ( Name, NamedThing(..),
getSrcLoc, mkLocalName, isLocalName, nameIsLocalOrFrom
getSrcLoc, mkLocalName, isLocalName, nameIsLocalOrFrom,
isHomePackageName
)
import NameEnv ( NameEnv, lookupNameEnv, nameEnvElts, elemNameEnv,
extendNameEnvList, emptyNameEnv, plusNameEnv )
......@@ -253,6 +254,9 @@ newDFunName clas [] loc = pprPanic "newDFunName" (ppr clas <+> ppr loc)
\begin{code}
isLocalThing :: NamedThing a => Module -> a -> Bool
isLocalThing mod thing = nameIsLocalOrFrom mod (getName thing)
isHomePackageThing :: NamedThing a => a -> Bool
isHomePackageThing thing = isHomePackageName (getName thing)
\end{code}
%************************************************************************
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment