X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FBasicTypes.lhs;h=cdfc28c4c90e54b31d8384653336548725a73aa2;hb=9526ada5b1e4a3463833bd74a15473d2ff7b53c1;hp=7a9ff56cdf1f78d40ed18198a3966fd51db7d616;hpb=2fe594477db10ac34edd8b7f44a96138b184c10e;p=ghc-hetmet.git diff --git a/compiler/basicTypes/BasicTypes.lhs b/compiler/basicTypes/BasicTypes.lhs index 7a9ff56..cdfc28c 100644 --- a/compiler/basicTypes/BasicTypes.lhs +++ b/compiler/basicTypes/BasicTypes.lhs @@ -58,7 +58,7 @@ module BasicTypes( #include "HsVersions.h" -import FastString( FastString ) +import FastString import Outputable \end{code} @@ -378,14 +378,26 @@ data OccInfo !OneBranch !InterestingCxt - | IAmALoopBreaker -- Used by the occurrence analyser to mark loop-breakers - -- in a group of recursive definitions + | IAmALoopBreaker -- Note [LoopBreaker OccInfo] !RulesOnly -- True <=> This is a weak or rules-only loop breaker - -- See OccurAnal Note [Weak loop breakers] + -- See OccurAnal Note [Weak loop breakers] type RulesOnly = Bool \end{code} +Note [LoopBreaker OccInfo] +~~~~~~~~~~~~~~~~~~~~~~~~~~ +An OccInfo of (IAmLoopBreaker False) is used by the occurrence +analyser in two ways: + (a) to mark loop-breakers in a group of recursive + definitions (hence the name) + (b) to mark binders that must not be inlined in this phase + (perhaps it has a NOINLINE pragma) +Things with (IAmLoopBreaker False) do not get an unfolding +pinned on to them, so they are completely opaque. + +See OccurAnal Note [Weak loop breakers] for (IAmLoopBreaker True). + \begin{code} isNoOcc :: OccInfo -> Bool