X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FbasicTypes%2FId.lhs;h=b1a4a1a5d7223b210f7574524b603a3b23f600c8;hb=7d841483081735f5f906a6bb5e80249d97f3226b;hp=9fa37b1fa28f50872f2f87760777a102d46ae7c9;hpb=2e95d5409279298a6c59492210001f468fcf47c3;p=ghc-hetmet.git diff --git a/ghc/compiler/basicTypes/Id.lhs b/ghc/compiler/basicTypes/Id.lhs index 9fa37b1..b1a4a1a 100644 --- a/ghc/compiler/basicTypes/Id.lhs +++ b/ghc/compiler/basicTypes/Id.lhs @@ -67,7 +67,7 @@ module Id ( idTyGenInfo, idWorkerInfo, idUnfolding, - idSpecialisation, + idSpecialisation, idCoreRules, idCgInfo, idCafInfo, idLBVarInfo, @@ -82,7 +82,7 @@ module Id ( #include "HsVersions.h" -import CoreSyn ( Unfolding, CoreRules ) +import CoreSyn ( Unfolding, CoreRules, IdCoreRule, rulesRules ) import BasicTypes ( Arity ) import Var ( Id, DictId, isId, isExportedId, isSpecPragmaId, isLocalId, @@ -394,6 +394,9 @@ setIdNewDemandInfo id dmd = modifyIdInfo (`setNewDemandInfo` dmd) id idSpecialisation :: Id -> CoreRules idSpecialisation id = specInfo (idInfo id) +idCoreRules :: Id -> [IdCoreRule] +idCoreRules id = [(id,rule) | rule <- rulesRules (idSpecialisation id)] + setIdSpecialisation :: Id -> CoreRules -> Id setIdSpecialisation id spec_info = modifyIdInfo (`setSpecInfo` spec_info) id