X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FDesugar.lhs;h=80b0dcbd8e860a703952848482dc5bc7c0232299;hb=2e06595241350a6548b6ab6430c65d6458f7c197;hp=e3874a7017d0c6c43f2265f7f9aea2b032edf4d9;hpb=d74b100eaa9e782710b752805ac148e91e5c6850;p=ghc-hetmet.git diff --git a/compiler/deSugar/Desugar.lhs b/compiler/deSugar/Desugar.lhs index e3874a7..80b0dcb 100644 --- a/compiler/deSugar/Desugar.lhs +++ b/compiler/deSugar/Desugar.lhs @@ -8,8 +8,6 @@ The Desugarer: turning HsSyn into Core. \begin{code} module Desugar ( deSugar, deSugarExpr ) where -#include "HsVersions.h" - import DynFlags import StaticFlags import HscTypes @@ -40,6 +38,7 @@ import SrcLoc import Maybes import FastString import Coverage + import Data.IORef \end{code} @@ -65,7 +64,7 @@ deSugar hsc_env tcg_fix_env = fix_env, tcg_inst_env = inst_env, tcg_fam_inst_env = fam_inst_env, - tcg_deprecs = deprecs, + tcg_warns = warns, tcg_binds = binds, tcg_fords = fords, tcg_rules = rules, @@ -130,7 +129,7 @@ deSugar hsc_env mg_dir_imps = imp_mods imports, mg_rdr_env = rdr_env, mg_fix_env = fix_env, - mg_deprecs = deprecs, + mg_warns = warns, mg_types = type_env, mg_insts = insts, mg_fam_insts = fam_insts, @@ -151,13 +150,15 @@ mkAutoScc mod exports | not opt_SccProfilingOn -- No profiling = NoSccs | opt_AutoSccsOnAllToplevs -- Add auto-scc on all top-level things - = AddSccs mod (\_ -> True) + = AddSccs mod (\id -> not $ isDerivedOccName $ getOccName id) + -- See #1641. This is pretty yucky, but I can't see a better way + -- to identify compiler-generated Ids, and at least this should + -- catch them all. | opt_AutoSccsOnExportedToplevs -- Only on exported things = AddSccs mod (\id -> idName id `elemNameSet` exports) | otherwise = NoSccs - deSugarExpr :: HscEnv -> Module -> GlobalRdrEnv -> TypeEnv -> LHsExpr Id @@ -273,6 +274,6 @@ dsRule (L loc (HsRule name act vars lhs _tv_lhs rhs _fv_rhs)) ; return (Just rule) } } } where - msg = hang (ptext SLIT("RULE left-hand side too complicated to desugar; ignored")) + msg = hang (ptext (sLit "RULE left-hand side too complicated to desugar; ignored")) 2 (ppr lhs) \end{code}