[project @ 2001-05-24 13:59:09 by simonpj]
[ghc-hetmet.git] / ghc / compiler / rename / RnNames.lhs
index 92712b1..2bfe8a5 100644 (file)
@@ -13,7 +13,7 @@ module RnNames (
 import CmdLineOpts     ( DynFlag(..) )
 
 import HsSyn           ( HsModule(..), HsDecl(..), IE(..), ieName, ImportDecl(..),
-                         ForeignDecl(..), ForKind(..), isDynamicExtName,
+                         ForeignDecl(..), 
                          collectLocatedHsBinders
                        )
 import RdrHsSyn                ( RdrNameIE, RdrNameImportDecl,
@@ -244,17 +244,11 @@ getLocalDeclBinders mod (ValD binds)
     new (rdr_name, loc) = newTopBinder mod rdr_name loc        `thenRn` \ name ->
                          returnRn (Avail name)
 
-getLocalDeclBinders mod (ForD (ForeignDecl nm kind _ ext_nm _ loc))
-  | binds_haskell_name kind
+getLocalDeclBinders mod (ForD (ForeignImport nm _ _ loc))
   = newTopBinder mod nm loc        `thenRn` \ name ->
     returnRn [Avail name]
-
-  | otherwise          -- a foreign export
+getLocalDeclBinders mod (ForD _)
   = returnRn []
-  where
-    binds_haskell_name (FoImport _) = True
-    binds_haskell_name FoLabel      = True
-    binds_haskell_name FoExport     = isDynamicExtName ext_nm
 
 getLocalDeclBinders mod (FixD _)    = returnRn []
 getLocalDeclBinders mod (DeprecD _) = returnRn []
@@ -324,7 +318,7 @@ filterImports mod from (Just (want_hiding, import_items)) total_avails
          Just avail@(AvailTC _ [n]) ->         -- This occurs when you import T(..), but
                                                -- only export T abstractly.  The single [n]
                                                -- in the AvailTC is the type or class itself
-                                       ifOptRn opt_WarnMisc (addWarnRn (dodgyImportWarn mod item))     `thenRn_`
+                                       ifOptRn Opt_WarnMisc (addWarnRn (dodgyImportWarn mod item))     `thenRn_`
                                        returnRn [(avail, [availName avail])]
          Just avail                 -> returnRn [(avail, [availName avail])]