[project @ 2000-11-24 09:24:40 by simonpj]
authorsimonpj <unknown>
Fri, 24 Nov 2000 09:24:40 +0000 (09:24 +0000)
committersimonpj <unknown>
Fri, 24 Nov 2000 09:24:40 +0000 (09:24 +0000)
Slurp unpackCString even for interfaces

ghc/compiler/rename/Rename.lhs

index 34b9625..e6d1d4f 100644 (file)
@@ -135,8 +135,8 @@ renameExpr dflags hit hst pcs this_module expr
                returnRn Nothing
          else
 
-         lookupOrigNames implicit_occs         `thenRn` \ implicit_names ->
-         slurpImpDecls (fvs `plusFV` implicit_names) `thenRn` \ decls ->
+         lookupOrigNames implicit_occs                 `thenRn` \ implicit_names ->
+         slurpImpDecls (fvs `plusFV` implicit_names)   `thenRn` \ decls ->
 
          doDump e decls  `thenRn_`
          returnRn (Just (print_unqual, (e, decls)))
@@ -603,8 +603,16 @@ closeIfaceDecls dflags hit hst pcs
        local_names    = foldl add emptyNameSet tycl_decls
        add names decl = addListToNameSet names (map fst (tyClDeclSysNames decl ++ tyClDeclNames decl))
     in
+       -- Record that we have now got declarations for local_names
     recordLocalSlurps local_names      `thenRn_`
-    closeDecls decls needed
+
+       -- Do the transitive closure
+    lookupOrigNames implicit_occs      `thenRn` \ implicit_names ->
+    closeDecls decls (needed `plusFV` implicit_names)
+  where
+    implicit_occs = string_occs        -- Data type decls with record selectors,
+                               -- which may appear in the decls, need unpackCString
+                               -- and friends. It's easier to just grab them right now.
 \end{code}
 
 %*********************************************************