X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2FbasicTypes%2FId.lhs;h=8f955d31fd646d506f85541ad64bcfaae9eef2a8;hb=b7d8dffaf1fefdf2f6b52fcf039a06843a28d586;hp=c7ce818adb64b34fe7e59fc5ca7542377fd50cd2;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/compiler/basicTypes/Id.lhs b/compiler/basicTypes/Id.lhs index c7ce818..8f955d3 100644 --- a/compiler/basicTypes/Id.lhs +++ b/compiler/basicTypes/Id.lhs @@ -66,7 +66,7 @@ module Id ( idNewStrictness, idNewStrictness_maybe, idWorkerInfo, idUnfolding, - idSpecialisation, idCoreRules, + idSpecialisation, idCoreRules, idHasRules, idCafInfo, idLBVarInfo, idOccInfo, @@ -409,6 +409,9 @@ idSpecialisation id = specInfo (idInfo id) idCoreRules :: Id -> [CoreRule] idCoreRules id = specInfoRules (idSpecialisation id) +idHasRules :: Id -> Bool +idHasRules id = not (isEmptySpecInfo (idSpecialisation id)) + setIdSpecialisation :: Id -> SpecInfo -> Id setIdSpecialisation id spec_info = modifyIdInfo (`setSpecInfo` spec_info) id