X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fmain%2FCodeOutput.lhs;h=6d11c654d9809d92db0e012a220b8a945a11c31a;hp=2c8a399a1b6c3aac12721891754054560fad06a3;hb=1a7d1b77334529ca96ed4cbc03fcb5f55dc2de4a;hpb=b8c0cca3b6d0203144bf4ef213be4597ce86eb33 diff --git a/compiler/main/CodeOutput.lhs b/compiler/main/CodeOutput.lhs index 2c8a399..6d11c65 100644 --- a/compiler/main/CodeOutput.lhs +++ b/compiler/main/CodeOutput.lhs @@ -4,11 +4,11 @@ \section{Code output phase} \begin{code} -{-# OPTIONS_GHC -w #-} +{-# OPTIONS -w #-} -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and fix -- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/WorkingConventions#Warnings +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings -- for details module CodeOutput( codeOutput, outputForeignStubs ) where @@ -30,7 +30,6 @@ import Finder ( mkStubPaths ) import PprC ( writeCs ) import CmmLint ( cmmLint ) import Packages -import PackageConfig ( rtsPackageId ) import Util import FastString ( unpackFS ) import Cmm ( RawCmm ) @@ -40,7 +39,7 @@ import DynFlags import ErrUtils ( dumpIfSet_dyn, showPass, ghcExit ) import Outputable import Pretty ( Mode(..), printDoc ) -import Module ( Module, ModLocation(..), moduleName ) +import Module import List ( nub ) import Maybes ( firstJust ) @@ -151,10 +150,10 @@ outputC dflags filenm mod location flat_absC hPutStr h ("/* GHC_PACKAGES " ++ unwords pkg_names ++ "\n*/\n") hPutStr h cc_injects when stub_h_exists $ - hPutStrLn h ("#include \"" ++ (filenameOf stub_h) ++ "\"") + hPutStrLn h ("#include \"" ++ inc_stub_h ++ "\"") writeCs dflags h flat_absC where - (_, stub_h) = mkStubPaths dflags (moduleName mod) location + (_, _, inc_stub_h) = mkStubPaths dflags (moduleName mod) location \end{code} @@ -265,7 +264,7 @@ outputForeignStubs dflags mod location stubs return (stub_h_file_exists, stub_c_file_exists) where - (stub_c, stub_h) = mkStubPaths dflags (moduleName mod) location + (stub_c, stub_h, _) = mkStubPaths dflags (moduleName mod) location cplusplus_hdr = "#ifdef __cplusplus\nextern \"C\" {\n#endif\n" cplusplus_ftr = "#ifdef __cplusplus\n}\n#endif\n"