[project @ 2002-11-06 12:49:47 by simonpj]
[ghc-hetmet.git] / ghc / compiler / rename / RnSource.lhs
index 0e53b07..674257f 100644 (file)
@@ -98,8 +98,6 @@ rnSrcDecls (HsGroup { hs_valds  = MonoBind binds sigs _,
        updGblEnv (\gbl -> gbl { tcg_fix_env = fix_env })
                  $ do {
 
-       failIfErrsM ;   -- No point in continuing if (say) we have duplicate declarations
-
                -- Rename other declarations
        (rn_val_decls, src_fvs1)     <- rnTopMonoBinds binds sigs ;
        (rn_inst_decls, src_fvs2)    <- mapFvRn rnSrcInstDecl inst_decls ;
@@ -274,8 +272,9 @@ rnBindsAndThen EmptyBinds          thing_inside = thing_inside EmptyBinds
 rnBindsAndThen (MonoBind bind sigs _)  thing_inside = rnMonoBindsAndThen bind sigs thing_inside
 rnBindsAndThen (IPBinds binds is_with) thing_inside
   = warnIf is_with withWarning                 `thenM_`
-    rnIPBinds binds                            `thenM` \ (binds',fvBinds) ->
-    thing_inside (IPBinds binds' is_with)
+    rnIPBinds binds                            `thenM` \ (binds',fv_binds) ->
+    thing_inside (IPBinds binds' is_with)      `thenM` \ (thing, fvs_thing) ->
+    returnM (thing, fvs_thing `plusFV` fv_binds)
 \end{code}