isPrimOpId, isPrimOpId_maybe,
isFCallId, isFCallId_maybe,
isDataConWorkId, isDataConWorkId_maybe,
- isBottomingId,
- hasNoBinding,
+ isBottomingId, idIsFrom,
+ hasNoBinding,
-- Inline pragma stuff
idInlinePragma, setInlinePragma, modifyInlinePragma,
#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 )
-- 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}