Minor refactoring of placeHolderPunRhs
[ghc-hetmet.git] / compiler / main / CodeOutput.lhs
index 3c82ea7..2d68b83 100644 (file)
@@ -33,10 +33,11 @@ import Outputable
 import Module
 import Maybes          ( firstJust )
 
-import Directory       ( doesFileExist )
-import Monad           ( when )
-import IO
+import Control.Exception
+import Control.Monad
+import System.Directory
 import System.FilePath
+import System.IO
 \end{code}
 
 %************************************************************************
@@ -126,7 +127,7 @@ outputC dflags filenm flat_absC packages
                       _          -> "#include \""++h_file++"\""
 
        pkg_configs <- getPreloadPackagesAnd dflags packages
-       let pkg_names = map (display.package) pkg_configs
+       let pkg_names = map (display.sourcePackageId) pkg_configs
 
        doOutput filenm $ \ h -> do
          hPutStr h ("/* GHC_PACKAGES " ++ unwords pkg_names ++ "\n*/\n")