projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3058c4a
)
[project @ 2003-10-13 10:41:43 by simonpj]
author
simonpj
<unknown>
Mon, 13 Oct 2003 10:41:43 +0000
(10:41 +0000)
committer
simonpj
<unknown>
Mon, 13 Oct 2003 10:41:43 +0000
(10:41 +0000)
Add idIsFrom
ghc/compiler/basicTypes/Id.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/basicTypes/Id.lhs
b/ghc/compiler/basicTypes/Id.lhs
index
3b36e58
..
3d2b4f6
100644
(file)
--- a/
ghc/compiler/basicTypes/Id.lhs
+++ b/
ghc/compiler/basicTypes/Id.lhs
@@
-30,8
+30,8
@@
module Id (
isPrimOpId, isPrimOpId_maybe,
isFCallId, isFCallId_maybe,
isDataConWorkId, isDataConWorkId_maybe,
isPrimOpId, isPrimOpId_maybe,
isFCallId, isFCallId_maybe,
isDataConWorkId, isDataConWorkId_maybe,
- isBottomingId,
- hasNoBinding,
+ isBottomingId, idIsFrom,
+ hasNoBinding,
-- Inline pragma stuff
idInlinePragma, setInlinePragma, modifyInlinePragma,
-- 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 )
#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
)
mkSystemName, mkSystemNameEncoded, mkInternalName,
getOccName, getSrcLoc
)
+import Module ( Module )
import OccName ( EncodedFS, mkWorkerOcc )
import PrimRep ( PrimRep )
import FieldLabel ( FieldLabel )
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
-- 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}
\end{code}
\begin{code}