diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2013-02-27 09:57:09 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2013-02-27 09:57:09 +0000 |
commit | 47d226544fc3fb11d024740a162f8ae4e1d044c9 (patch) | |
tree | 8a024b97de71216f6b3606d3cda7bf16ae1f98a6 /compiler/main/CodeOutput.lhs | |
parent | 7b5e514d85c086be8dc6d938b526c97b6ced56eb (diff) | |
parent | 0ee31659afe7a6819f9eb5e233f98e5592f1b439 (diff) | |
download | haskell-tc-arrows.tar.gz |
Merge remote-tracking branch 'origin/master' into tc-arrowstc-arrows
Diffstat (limited to 'compiler/main/CodeOutput.lhs')
-rw-r--r-- | compiler/main/CodeOutput.lhs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/main/CodeOutput.lhs b/compiler/main/CodeOutput.lhs index 047cc018da..817d789a93 100644 --- a/compiler/main/CodeOutput.lhs +++ b/compiler/main/CodeOutput.lhs @@ -145,12 +145,14 @@ outputAsm dflags filenm cmm_stream = do ncg_uniqs <- mkSplitUniqSupply 'n' let filenmDyn = filenm ++ "-dyn" - withHandles f = doOutput filenm $ \h -> - ifGeneratingDynamicToo dflags - (doOutput filenmDyn $ \dynH -> - f [(h, dflags), - (dynH, doDynamicToo dflags)]) - (f [(h, dflags)]) + withHandles f = do debugTraceMsg dflags 4 (text "Outputing asm to" <+> text filenm) + doOutput filenm $ \h -> + ifGeneratingDynamicToo dflags + (do debugTraceMsg dflags 4 (text "Outputing dynamic-too asm to" <+> text filenmDyn) + doOutput filenmDyn $ \dynH -> + f [(h, dflags), + (dynH, doDynamicToo dflags)]) + (f [(h, dflags)]) _ <- {-# SCC "OutputAsm" #-} withHandles $ \hs -> {-# SCC "NativeCodeGen" #-} |