X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FbasicTypes%2FIdInfo.lhs;fp=ghc%2Fcompiler%2FbasicTypes%2FIdInfo.lhs;h=5dd58543e7950b3a2a75f3a8a305f22f24f09785;hb=e6d004928bcd0e71ba58c034b6fe4c870e6a70cb;hp=fdaef1a23223d728f7bd59e1391ec8493eb68f71;hpb=115f0fae2f782836550a9419f739fd29c09e4f1b;p=ghc-hetmet.git diff --git a/ghc/compiler/basicTypes/IdInfo.lhs b/ghc/compiler/basicTypes/IdInfo.lhs index fdaef1a..5dd5854 100644 --- a/ghc/compiler/basicTypes/IdInfo.lhs +++ b/ghc/compiler/basicTypes/IdInfo.lhs @@ -38,7 +38,7 @@ module IdInfo ( workerInfo, setWorkerInfo, ppWorkerInfo, -- Unfolding - unfoldingInfo, setUnfoldingInfo, + unfoldingInfo, setUnfoldingInfo, setUnfoldingInfoLazily, #ifdef OLD_STRICTNESS -- Old DemandInfo and StrictnessInfo @@ -347,7 +347,11 @@ setStrictnessInfo info st = st `seq` info { strictnessInfo = st } #endif -- Try to avoid spack leaks by seq'ing -setUnfoldingInfo info uf +setUnfoldingInfoLazily info uf -- Lazy variant to avoid looking at the + = -- unfolding of an imported Id unless necessary + info { unfoldingInfo = uf } -- (In this case the demand-zapping is redundant.) + +setUnfoldingInfo info uf | isEvaldUnfolding uf -- If the unfolding is a value, the demand info may -- go pear-shaped, so we nuke it. Example: