summaryrefslogtreecommitdiff
path: root/ghc/compiler/rename/RnIfaces.lhs
diff options
context:
space:
mode:
authorsimonpj <unknown>2001-05-24 13:59:12 +0000
committersimonpj <unknown>2001-05-24 13:59:12 +0000
commitcbdeae8fc8a1c72d20d89241acae8a313214b51c (patch)
tree2bde25b0907554080b9ee1e92446f575f87e04eb /ghc/compiler/rename/RnIfaces.lhs
parentf70aaa982380a9d210ca136983eb62e7b35062c7 (diff)
downloadhaskell-cbdeae8fc8a1c72d20d89241acae8a313214b51c.tar.gz
[project @ 2001-05-24 13:59:09 by simonpj]
------------------------------------------------------ More stuff towards generalising 'foreign' declarations ------------------------------------------------------ This is the second step towards generalising 'foreign' declarations to handle langauges other than C. Now I can handle foreign import dotnet type T foreign import dotnet "void Foo.Baz.f( T )" f :: T -> IO () ** WARNING ** I believe that all the foreign stuff for C should work exactly as before, but I have not tested it thoroughly. Sven, Manuel, Marcin: please give it a whirl and compare old with new output. Lots of fiddling around with data types. The main changes are * HsDecls.lhs The ForeignDecl type and its friends Note also the ForeignType constructor to TyClDecl * ForeignCall.lhs Here's where the stuff that survives right through compilation lives * TcForeign.lhs DsForeign.lhs Substantial changes driven by the new data types * Parser.y ParseIface.y RnSource Just what you'd expect
Diffstat (limited to 'ghc/compiler/rename/RnIfaces.lhs')
-rw-r--r--ghc/compiler/rename/RnIfaces.lhs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ghc/compiler/rename/RnIfaces.lhs b/ghc/compiler/rename/RnIfaces.lhs
index 7cab59c01d..f60ae46059 100644
--- a/ghc/compiler/rename/RnIfaces.lhs
+++ b/ghc/compiler/rename/RnIfaces.lhs
@@ -489,7 +489,8 @@ getGates :: FreeVars -- Things mentioned in the source program
getGates source_fvs decl
= get_gates (\n -> n `elemNameSet` source_fvs) decl
-get_gates is_used (IfaceSig {tcdType = ty}) = extractHsTyNames ty
+get_gates is_used (ForeignType {tcdName = tycon}) = unitNameSet tycon
+get_gates is_used (IfaceSig {tcdType = ty}) = extractHsTyNames ty
get_gates is_used (ClassDecl { tcdCtxt = ctxt, tcdName = cls, tcdTyVars = tvs, tcdSigs = sigs})
= (super_cls_and_sigs `addOneToNameSet` cls) `unionNameSets`