X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FId.lhs;h=fd65fe40090abb82fa97e2b96b070e57fed08662;hb=ea94a66d93047a9b0cd4532645eb1e9be04888e1;hp=d8771bcde87283cc6af1fceab47bfff05d69a989;hpb=8e5442bab1ca5cd9239690af664374cac585f8b2;p=ghc-hetmet.git diff --git a/compiler/basicTypes/Id.lhs b/compiler/basicTypes/Id.lhs index d8771bc..fd65fe4 100644 --- a/compiler/basicTypes/Id.lhs +++ b/compiler/basicTypes/Id.lhs @@ -49,7 +49,7 @@ module Id ( isImplicitId, isDeadBinder, isDictId, isStrictId, isExportedId, isLocalId, isGlobalId, isRecordSelector, isNaughtyRecordSelector, - isClassOpId_maybe, isDFunId, + isClassOpId_maybe, isDFunId, dfunNSilent, isPrimOpId, isPrimOpId_maybe, isFCallId, isFCallId_maybe, isDataConWorkId, isDataConWorkId_maybe, isDataConId_maybe, idDataCon, @@ -172,7 +172,7 @@ localiseId :: Id -> Id -- Make an with the same unique and type as the -- incoming Id, but with an *Internal* Name and *LocalId* flavour localiseId id - | isLocalId id && isInternalName name + | ASSERT( isId id ) isLocalId id && isInternalName name = id | otherwise = mkLocalIdWithInfo (localiseName name) (idType id) (idInfo id) @@ -332,8 +332,13 @@ isPrimOpId id = case Var.idDetails id of _ -> False isDFunId id = case Var.idDetails id of - DFunId _ -> True - _ -> False + DFunId {} -> True + _ -> False + +dfunNSilent :: Id -> Int +dfunNSilent id = case Var.idDetails id of + DFunId ns _ -> ns + _ -> pprTrace "dfunSilent: not a dfun:" (ppr id) 0 isPrimOpId_maybe id = case Var.idDetails id of PrimOpId op -> Just op