X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FbasicTypes%2FId.lhs;h=63ef83f955434f8132067d521152d697cc2b1652;hb=8e67f5502e2e316245806ee3735a2f41a844b611;hp=ae3c1039729680c03edc116e49116d033cf077ec;hpb=23f40f0e9be6d4aa5cf9ea31d73f4013f8e7b4bd;p=ghc-hetmet.git diff --git a/ghc/compiler/basicTypes/Id.lhs b/ghc/compiler/basicTypes/Id.lhs index ae3c103..63ef83f 100644 --- a/ghc/compiler/basicTypes/Id.lhs +++ b/ghc/compiler/basicTypes/Id.lhs @@ -19,7 +19,7 @@ module Id ( recordSelectorFieldLabel, -- Modifying an Id - setIdName, setIdUnique, Id.setIdType, setIdLocalExported, + setIdName, setIdUnique, Id.setIdType, setIdExported, setIdNotExported, setIdInfo, lazySetIdInfo, modifyIdInfo, maybeModifyIdInfo, zapLamIdInfo, zapDemandIdInfo, @@ -79,12 +79,13 @@ module Id ( #include "HsVersions.h" -import CoreSyn ( Unfolding, CoreRules, IdCoreRule, rulesRules ) +import CoreSyn ( Unfolding, CoreRules, IdCoreRule(..), rulesRules ) import BasicTypes ( Arity ) import Var ( Id, DictId, isId, isExportedId, isSpecPragmaId, isLocalId, idName, idType, idUnique, idInfo, isGlobalId, - setIdName, setIdType, setIdUnique, setIdLocalExported, + setIdName, setIdType, setIdUnique, + setIdExported, setIdNotExported, setIdInfo, lazySetIdInfo, modifyIdInfo, maybeModifyIdInfo, globalIdDetails @@ -102,7 +103,7 @@ import qualified Demand ( Demand ) import DataCon ( isUnboxedTupleCon ) import NewDemand ( Demand, StrictSig, topDmd, topSig, isBottomingSig ) import Name ( Name, OccName, nameIsLocalOrFrom, - mkSystemName, mkSystemNameEncoded, mkInternalName, + mkSystemVarName, mkSystemVarNameEncoded, mkInternalName, getOccName, getSrcLoc ) import Module ( Module ) @@ -167,10 +168,10 @@ mkVanillaGlobal :: Name -> Type -> IdInfo -> Id -- for SysLocal, we assume the base name is already encoded, to avoid -- re-encoding the same string over and over again. -mkSysLocal fs uniq ty = mkLocalId (mkSystemNameEncoded uniq fs) ty +mkSysLocal fs uniq ty = mkLocalId (mkSystemVarNameEncoded uniq fs) ty -- version to use when the faststring needs to be encoded -mkSysLocalUnencoded fs uniq ty = mkLocalId (mkSystemName uniq fs) ty +mkSysLocalUnencoded fs uniq ty = mkLocalId (mkSystemVarName uniq fs) ty mkUserLocal occ uniq ty loc = mkLocalId (mkInternalName uniq occ loc) ty mkVanillaGlobal = mkGlobalId VanillaGlobal @@ -395,7 +396,7 @@ idSpecialisation :: Id -> CoreRules idSpecialisation id = specInfo (idInfo id) idCoreRules :: Id -> [IdCoreRule] -idCoreRules id = [(id,rule) | rule <- rulesRules (idSpecialisation id)] +idCoreRules id = [IdCoreRule id False rule | rule <- rulesRules (idSpecialisation id)] setIdSpecialisation :: Id -> CoreRules -> Id setIdSpecialisation id spec_info = modifyIdInfo (`setSpecInfo` spec_info) id