diff options
| author | Lemmih <lemmih@gmail.com> | 2006-03-04 12:39:57 +0000 |
|---|---|---|
| committer | Lemmih <lemmih@gmail.com> | 2006-03-04 12:39:57 +0000 |
| commit | 229307330827699a964174a69b03969769ca19dd (patch) | |
| tree | be1ebc5e4761cd1ef543f2ed96511114871c7962 | |
| parent | 241eb302d81d3bf23d78fb8b17289a214f797ee5 (diff) | |
| download | haskell-229307330827699a964174a69b03969769ca19dd.tar.gz | |
Allow hscCompileMake to target HscNothing.
| -rw-r--r-- | ghc/compiler/main/HscMain.lhs | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/ghc/compiler/main/HscMain.lhs b/ghc/compiler/main/HscMain.lhs index 330f79a67f..7236620b90 100644 --- a/ghc/compiler/main/HscMain.lhs +++ b/ghc/compiler/main/HscMain.lhs @@ -260,32 +260,18 @@ hscCompileMake :: Compiler (HscStatus, ModIface, ModDetails) hscCompileMake hsc_env mod_summary = compiler hsc_env mod_summary where mkComp = hscMkCompiler norecompMake + backend = case hscTarget (hsc_dflags hsc_env) of + HscNothing -> hscCodeGenSimple (\(i, d, g) -> (NewHscRecomp False, i, d)) + _other -> hscCodeGenMake compiler = case ms_hsc_src mod_summary of ExtCoreFile - -> mkComp hscCoreFrontEnd hscNewBackEnd hscCodeGenMake + -> mkComp hscCoreFrontEnd hscNewBackEnd backend HsSrcFile - -> mkComp hscFileFrontEnd hscNewBackEnd hscCodeGenMake + -> mkComp hscFileFrontEnd hscNewBackEnd backend HsBootFile -> mkComp hscFileFrontEnd hscNewBootBackEnd hscCodeGenIdentity --- Same as 'hscCompileMake' but don't generate any actual code. -hscCompileMakeNothing :: Compiler (HscStatus, ModIface, ModDetails) -hscCompileMakeNothing hsc_env mod_summary - = compiler hsc_env mod_summary - where mkComp = hscMkCompiler norecompMake - codeGen = hscCodeGenSimple (\(i, d, g) -> (NewHscRecomp False, i, d)) - compiler - = case ms_hsc_src mod_summary of - ExtCoreFile - -> mkComp hscCoreFrontEnd hscNewBackEnd - codeGen - HsSrcFile - -> mkComp hscFileFrontEnd hscNewBackEnd - codeGen - HsBootFile - -> mkComp hscFileFrontEnd hscNewBootBackEnd - hscCodeGenIdentity -- Compile Haskell, extCore to bytecode. hscCompileInteractive :: Compiler (InteractiveStatus, ModIface, ModDetails) |
