From: simonpj Date: Wed, 25 Sep 2002 11:46:02 +0000 (+0000) Subject: [project @ 2002-09-25 11:46:02 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~1640 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f3a5e6da3f50e6afdde52988bfabe6ea7b581ac1;p=ghc-hetmet.git [project @ 2002-09-25 11:46:02 by simonpj] Remember to import the things used by foreign export --- diff --git a/ghc/compiler/rename/RnSource.lhs b/ghc/compiler/rename/RnSource.lhs index d90f63a..a368122 100644 --- a/ghc/compiler/rename/RnSource.lhs +++ b/ghc/compiler/rename/RnSource.lhs @@ -301,7 +301,10 @@ rnHsForeignDecl (ForeignExport name ty spec isDeprec src_loc) lookupOccRn name `thenM` \ name' -> rnHsTypeFVs (fo_decl_msg name) ty `thenM` \ (ty', fvs) -> returnM (ForeignExport name' ty' spec isDeprec src_loc, - mkFVs [bindIOName, returnIOName] `plusFV` fvs) + mkFVs [name', bindIOName, returnIOName] `plusFV` fvs ) + -- NB: a foreign export is an *occurrence site* for name, so + -- we add it to the free-variable list. It might, for example, + -- be imported from another module fo_decl_msg name = ptext SLIT("In the foreign declaration for") <+> ppr name \end{code}