Commit edb232e6 authored by simonpj's avatar simonpj

[project @ 2003-10-13 10:41:43 by simonpj]

Add idIsFrom
parent 3058c4a9
......@@ -30,8 +30,8 @@ module Id (
isPrimOpId, isPrimOpId_maybe,
isFCallId, isFCallId_maybe,
isDataConWorkId, isDataConWorkId_maybe,
isBottomingId,
hasNoBinding,
isBottomingId, idIsFrom,
hasNoBinding,
-- Inline pragma stuff
idInlinePragma, setInlinePragma, modifyInlinePragma,
......@@ -98,10 +98,11 @@ import qualified Demand ( Demand )
#endif
import DataCon ( isUnboxedTupleCon )
import NewDemand ( Demand, StrictSig, topDmd, topSig, isBottomingSig )
import Name ( Name, OccName,
import Name ( Name, OccName, nameIsLocalOrFrom,
mkSystemName, mkSystemNameEncoded, mkInternalName,
getOccName, getSrcLoc
)
import Module ( Module )
import OccName ( EncodedFS, mkWorkerOcc )
import PrimRep ( PrimRep )
import FieldLabel ( FieldLabel )
......@@ -295,6 +296,9 @@ isImplicitId id
-- The dfun id is not an implicit Id; it must *not* be omitted, because
-- it carries version info for the instance decl
other -> False
idIsFrom :: Module -> Id -> Bool
idIsFrom mod id = nameIsLocalOrFrom mod (idName id)
\end{code}
\begin{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