[commit: packages/random] new_api: Removed ifdefd debugging trace messages. (08b60a4)
git at git.haskell.org
git at git.haskell.org
Thu Mar 19 15:44:20 UTC 2015
Repository : ssh://git@git.haskell.org/random
On branch : new_api
Link : http://git.haskell.org/packages/random.git/commitdiff/08b60a4e49c6cab5c0f04f200bcfbba02e03feae
>---------------------------------------------------------------
commit 08b60a4e49c6cab5c0f04f200bcfbba02e03feae
Author: Ryan Newton <rrnewton at gmail.com>
Date: Tue Jun 28 10:36:48 2011 -0400
Removed ifdefd debugging trace messages.
>---------------------------------------------------------------
08b60a4e49c6cab5c0f04f200bcfbba02e03feae
System/Random.hs | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/System/Random.hs b/System/Random.hs
index 931f2bd..4ef2090 100644
--- a/System/Random.hs
+++ b/System/Random.hs
@@ -90,13 +90,6 @@ import System.IO.Unsafe ( unsafePerformIO )
import Data.IORef
import Numeric ( readDec )
--- #define DEBUGRAND
-#ifdef DEBUGRAND
-import Numeric ( showIntAtBase )
-import Data.Char ( intToDigit )
-import Debug.Trace
-#endif
-
-- The standard nhc98 implementation of Time.ClockTime does not match
-- the extended one expected in this module, so we lash-up a quick
-- replacement here.
@@ -423,10 +416,6 @@ randomBits desired gen =
-- Otherwise we must make sure not to generate too many bits:
else
let shifted = fromIntegral (x `shiftR` (bits - c)) in
-#ifdef DEBUGRAND
- trace (" Got random "++ showIntAtBase 16 intToDigit x "" ++
- ", shifted "++ show (bits-c)++": " ++ show shifted) $
-#endif
(acc `shiftL` c .|. shifted, g')
in loop gen 0 desired
Nothing -> error "TODO: IMPLEMENT ME - handle undesirable bit sources"
@@ -455,10 +444,6 @@ randomIvalBits_raw :: (RandomGen g, Integral a, Bits a) =>
randomIvalBits_raw maxbits (l,h) rng
| l > h = randomIvalBits (h,l) rng
| otherwise =
-#ifdef DEBUGRAND
- trace (" Got pow2: "++show pow2++" bounding "++show bounding++" maxbits "++show maxbits++
- " range " ++ show range ++ " cutoff "++ show cutoff) $
-#endif
if special_case
-- In the special case we don't offset from the lower bound:
then (h - cutoff + fin_x + 1, fin_rng)
More information about the ghc-commits
mailing list