X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FTidyPgm.lhs;h=bacbee47e8cf58ba3215c5c6c08a66ef4ca9dbc3;hb=5b016a3f9e10a7714453913a97273ca3d180d372;hp=8c570053bbd83b21f62345d4395796e1d2d51d1b;hpb=611b0cae64bb3403d0bac78e8a1786a4a6e5061a;p=ghc-hetmet.git diff --git a/ghc/compiler/main/TidyPgm.lhs b/ghc/compiler/main/TidyPgm.lhs index 8c57005..bacbee4 100644 --- a/ghc/compiler/main/TidyPgm.lhs +++ b/ghc/compiler/main/TidyPgm.lhs @@ -493,7 +493,7 @@ tidyTopBinder mod ext_ids cg_info_env rec_tidy_env rhs tidy_rhs tidyTopIdInfo tidy_env is_external idinfo unfold_info arity cg_info | opt_OmitInterfacePragmas -- If the interface file has no pragma info - = vanillaIdInfo -- then discard all info right here + = hasCafIdInfo -- then discard all info right here -- This is not so important for *this* module, but it's -- vital for ghc --make: -- subsequent compilations must not see (e.g.) the arity if @@ -501,11 +501,16 @@ tidyTopIdInfo tidy_env is_external idinfo unfold_info arity cg_info -- If they do, they'll exploit the arity; then the arity might -- change, but the iface file doesn't change => recompilation -- does not happen => disaster + -- + -- This IdInfo will live long-term in the Id => need to make + -- conservative assumption about Caf-hood | not is_external -- For internal Ids (not externally visible) = vanillaIdInfo -- we only need enough info for code generation -- Arity and strictness info are enough; -- c.f. CoreTidy.tidyLetBndr + -- Use vanillaIdInfo (whose CafInfo is a panic) because we + -- should not need the CafInfo `setArityInfo` arity `setAllStrictnessInfo` newStrictnessInfo idinfo