diff --git a/ghc/compiler/nativeGen/AsmCodeGen.lhs b/ghc/compiler/nativeGen/AsmCodeGen.lhs
index fad365320359d973aa05cb7b15494385072731b0..d57f34b8a0d8861c496d7c4dc1037e22f7ad1104 100644
--- a/ghc/compiler/nativeGen/AsmCodeGen.lhs
+++ b/ghc/compiler/nativeGen/AsmCodeGen.lhs
@@ -83,8 +83,8 @@ writeRealAsm :: Handle -> AbstractC -> UniqSupply -> IO ()
 writeRealAsm handle absC us
   = _scc_ "writeRealAsm" (printDoc LeftMode handle (runNCG absC us))
 
-dumpRealAsm :: AbstractC -> UniqSupply -> String
-dumpRealAsm absC us = show (runNCG absC us)
+dumpRealAsm :: AbstractC -> UniqSupply -> Doc
+dumpRealAsm = runNCG
 
 runNCG absC
   = genCodeAbstractC absC	`thenUs` \ treelists ->