diff options
Diffstat (limited to 'compiler/basicTypes/IdInfo.hs')
-rw-r--r-- | compiler/basicTypes/IdInfo.hs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler/basicTypes/IdInfo.hs b/compiler/basicTypes/IdInfo.hs index 8a59b98959..dea309de1a 100644 --- a/compiler/basicTypes/IdInfo.hs +++ b/compiler/basicTypes/IdInfo.hs @@ -54,8 +54,7 @@ module IdInfo ( isDeadOcc, isStrongLoopBreaker, isWeakLoopBreaker, occInfo, setOccInfo, - InsideLam, OneBranch, - insideLam, notInsideLam, oneBranch, notOneBranch, + InsideLam(..), OneBranch(..), TailCallInfo(..), tailCallInfo, isAlwaysTailCalled, @@ -403,7 +402,7 @@ But we don't do that for instance declarations and so we just treat them all uniformly. The EXCEPTION is PrimOpIds, which do have rules in their IdInfo. That is -jsut for convenience really. +just for convenience really. However, LocalIds may have non-empty RuleInfo. We treat them differently because: @@ -508,12 +507,12 @@ zapLamInfo info@(IdInfo {occInfo = occ, demandInfo = demand}) where -- The "unsafe" occ info is the ones that say I'm not in a lambda -- because that might not be true for an unsaturated lambda - is_safe_occ occ | isAlwaysTailCalled occ = False - is_safe_occ (OneOcc { occ_in_lam = in_lam }) = in_lam - is_safe_occ _other = True + is_safe_occ occ | isAlwaysTailCalled occ = False + is_safe_occ (OneOcc { occ_in_lam = NotInsideLam }) = False + is_safe_occ _other = True safe_occ = case occ of - OneOcc{} -> occ { occ_in_lam = True + OneOcc{} -> occ { occ_in_lam = IsInsideLam , occ_tail = NoTailCallInfo } IAmALoopBreaker{} -> occ { occ_tail = NoTailCallInfo } |