X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Futils%2FBinary.hs;h=2ebc856f584c6d1b384b48e37e12d7135a98574c;hb=08652e67c4d5d9a40687f93c286021a867c1bca0;hp=466a515dfc631324b059f059e6c39f37bbf299f1;hpb=fcf6b22d0478be20e27c2245f3e34dd272e12522;p=ghc-hetmet.git diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs index 466a515..2ebc856 100644 --- a/compiler/utils/Binary.hs +++ b/compiler/utils/Binary.hs @@ -61,6 +61,7 @@ import Unique import Panic import UniqFM import FastMutInt +import Util import Foreign import Data.Array.IO @@ -234,9 +235,8 @@ expandBin (BinMem _ _ sz_r arr_r) off = do | i <- [ 0 .. sz-1 ] ] writeFastMutInt sz_r sz' writeIORef arr_r arr' -#ifdef DEBUG - hPutStrLn stderr ("Binary: expanding to size: " ++ show sz') -#endif + when debugIsOn $ + hPutStrLn stderr ("Binary: expanding to size: " ++ show sz') return () expandBin (BinIO _ _ _) _ = return () -- no need to expand a file, we'll assume they expand by themselves.