[project @ 2004-01-05 12:11:42 by simonpj]
[ghc-hetmet.git] / ghc / compiler / deSugar / Desugar.lhs
index d95ca8c..2deb343 100644 (file)
@@ -39,7 +39,6 @@ import CoreFVs                ( ruleRhsFreeVars )
 import ErrUtils                ( doIfSet, dumpIfSet_dyn, pprBagOfWarnings, 
                          mkWarnMsg, errorsFound, WarnMsg )
 import Outputable
-import qualified Pretty
 import UniqSupply      ( mkSplitUniqSupply )
 import SrcLoc          ( Located(..), SrcSpan, unLoc )
 import DATA_IOREF      ( readIORef )
@@ -234,9 +233,7 @@ addExportFlags ghci_mode exports keep_alive bndrs prs rules
        -- introduced by the type checker.
     is_exported :: Name -> Bool
     is_exported | ghci_mode == Interactive = isExternalName
-               | otherwise                = (`elemNameSet` export_fvs)
-
-    export_fvs = availsToNameSet exports
+               | otherwise                = (`elemNameSet` exports)
 
 ppr_ds_rules [] = empty
 ppr_ds_rules rules
@@ -261,7 +258,7 @@ dsRule in_scope (L loc (HsRule name act vars lhs rhs))
     returnDs (fn, Rule name act tpl_vars args core_rhs)
   where
     tpl_vars = [var | RuleBndr (L _ var) <- vars]
-    all_vars = mkInScopeSet (in_scope `unionVarSet` mkVarSet tpl_vars)
+    all_vars = mkInScopeSet (extendVarSetList in_scope tpl_vars)
 
 ds_lhs all_vars lhs
   = let