X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FIdInfo.lhs;h=e64e255a9537e9485baae0d0057826d156833d28;hb=5d536b42c88dbe9523c4b0c799a0e46c2d984aa6;hp=c1a69b28690f387999d4cd843cac51d6a625b14e;hpb=ad94d40948668032189ad22a0ad741ac1f645f50;p=ghc-hetmet.git diff --git a/compiler/basicTypes/IdInfo.lhs b/compiler/basicTypes/IdInfo.lhs index c1a69b2..e64e255 100644 --- a/compiler/basicTypes/IdInfo.lhs +++ b/compiler/basicTypes/IdInfo.lhs @@ -12,7 +12,7 @@ Haskell. [WDP 94/11]) -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and fix -- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/CodingStyle#Warnings +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings -- for details module IdInfo ( @@ -704,11 +704,11 @@ zapLamInfo info@(IdInfo {occInfo = occ, newDemandInfo = demand}) -- 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 (OneOcc in_lam _ _) = in_lam - is_safe_occ other = True + is_safe_occ _other = True safe_occ = case occ of OneOcc _ once int_cxt -> OneOcc insideLam once int_cxt - other -> occ + _other -> occ is_safe_dmd Nothing = True is_safe_dmd (Just dmd) = not (isStrictDmd dmd) @@ -724,9 +724,13 @@ zapDemandInfo info@(IdInfo {newDemandInfo = dmd}) \begin{code} zapFragileInfo :: IdInfo -> Maybe IdInfo -- Zap info that depends on free variables -zapFragileInfo info = Just (info `setSpecInfo` emptySpecInfo - `setWorkerInfo` NoWorker - `setUnfoldingInfo` NoUnfolding) +zapFragileInfo info + = Just (info `setSpecInfo` emptySpecInfo + `setWorkerInfo` NoWorker + `setUnfoldingInfo` NoUnfolding + `setOccInfo` if isFragileOcc occ then NoOccInfo else occ) + where + occ = occInfo info \end{code} %************************************************************************