X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FcoreSyn%2FCoreSyn.lhs;h=28c913d369861f4d109de9edc6847171d6995197;hb=1f7da30204a9b735e8bc543a5bacf03135bcc9c7;hp=69c49ddfd7887235a3f4390aa3e48524b52bfa5e;hpb=c1a7d1a618d86260360e8bde9429e357df95c2de;p=ghc-hetmet.git diff --git a/ghc/compiler/coreSyn/CoreSyn.lhs b/ghc/compiler/coreSyn/CoreSyn.lhs index 69c49dd..28c913d 100644 --- a/ghc/compiler/coreSyn/CoreSyn.lhs +++ b/ghc/compiler/coreSyn/CoreSyn.lhs @@ -41,7 +41,7 @@ module CoreSyn ( -- Core rules CoreRules(..), -- Representation needed by friends CoreRule(..), -- CoreSubst, CoreTidy, CoreFVs, PprCore only - IdCoreRule, + IdCoreRule(..), isOrphanRule, RuleName, emptyCoreRules, isEmptyCoreRules, rulesRhsFreeVars, rulesRules, isBuiltinRule, ruleName @@ -186,7 +186,12 @@ rulesRules (Rules rules _) = rules \begin{code} type RuleName = FastString -type IdCoreRule = (Id,CoreRule) -- Rules don't have their leading Id inside them +data IdCoreRule = IdCoreRule Id -- A rule for this Id + Bool -- True <=> orphan rule + CoreRule -- The rule itself + +isOrphanRule :: IdCoreRule -> Bool +isOrphanRule (IdCoreRule _ is_orphan _) = is_orphan data CoreRule = Rule RuleName