diff options
author | simonpj <unknown> | 2000-11-10 15:12:55 +0000 |
---|---|---|
committer | simonpj <unknown> | 2000-11-10 15:12:55 +0000 |
commit | f23ba2b294429ccbdeb80f0344ec08f6abf61bb7 (patch) | |
tree | 30e94ffff421c99ae25f35759e52b7e267e9e8af /ghc/compiler/main/CodeOutput.lhs | |
parent | 6bd12a0cb5115d08a9ee84dbc1920e83bb7c1616 (diff) | |
download | haskell-f23ba2b294429ccbdeb80f0344ec08f6abf61bb7.tar.gz |
[project @ 2000-11-10 15:12:50 by simonpj]
1. Outputable.PprStyle now carries a bit more information
In particular, the printing style tells whether to print
a name in unqualified form. This used to be embedded in
a Name, but since Names now outlive a single compilation unit,
that's no longer appropriate.
So now the print-unqualified predicate is passed in the printing
style, not embedded in the Name.
2. I tidied up HscMain a little. Many of the showPass messages
have migraged into the repective pass drivers
Diffstat (limited to 'ghc/compiler/main/CodeOutput.lhs')
-rw-r--r-- | ghc/compiler/main/CodeOutput.lhs | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/ghc/compiler/main/CodeOutput.lhs b/ghc/compiler/main/CodeOutput.lhs index a8a1a0a3b3..0d865b99ac 100644 --- a/ghc/compiler/main/CodeOutput.lhs +++ b/ghc/compiler/main/CodeOutput.lhs @@ -27,7 +27,7 @@ import AbsCSyn ( AbstractC ) import PprAbsC ( dumpRealC, writeRealC ) import Module ( Module ) import CmdLineOpts -import ErrUtils ( dumpIfSet_dyn ) +import ErrUtils ( dumpIfSet_dyn, showPass ) import Outputable import CmdLineOpts ( DynFlags, HscLang(..), dopt_OutName ) import TmpFiles ( newTempName ) @@ -61,16 +61,18 @@ codeOutput dflags mod_name tycons core_binds stg_binds -- Dunno if the above comment is still meaningful now. JRS 001024. - do let filenm = dopt_OutName dflags - stub_names <- outputForeignStubs dflags c_code h_code - case dopt_HscLang dflags of - HscInterpreted -> return stub_names - HscAsm -> outputAsm dflags filenm flat_abstractC - >> return stub_names - HscC -> outputC dflags filenm flat_abstractC - >> return stub_names - HscJava -> outputJava dflags filenm mod_name tycons core_binds - >> return stub_names + do { showPass dflags "CodeOutput" + ; let filenm = dopt_OutName dflags + ; stub_names <- outputForeignStubs dflags c_code h_code + ; case dopt_HscLang dflags of + HscInterpreted -> return stub_names + HscAsm -> outputAsm dflags filenm flat_abstractC + >> return stub_names + HscC -> outputC dflags filenm flat_abstractC + >> return stub_names + HscJava -> outputJava dflags filenm mod_name tycons core_binds + >> return stub_names + } doOutput :: String -> (Handle -> IO ()) -> IO () doOutput filenm io_action @@ -130,7 +132,7 @@ outputAsm dflags filenm flat_absC \begin{code} outputJava dflags filenm mod tycons core_binds - = doOutput filenm (\ f -> printForUser f pp_java) + = doOutput filenm (\ f -> printForUser f alwaysQualify pp_java) -- User style printing for now to keep indentation where java_code = javaGen mod [{- Should be imports-}] tycons core_binds |